summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-1.js39
-rw-r--r--test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-3.js48
-rw-r--r--test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-4.js45
-rw-r--r--test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-5.js44
-rw-r--r--test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-2-c-1.js39
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-1.js38
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-2.js39
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-12-1.js38
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-12-2.js43
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-13-1.js38
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-5-1.js36
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-6-1.js39
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-6-2.js42
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-6-3.js34
-rw-r--r--test/suite/ietestcenter/chapter10/10.6/10.6-6-4.js34
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.4/11.1.4-0.js35
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-1.js44
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-2.js49
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-2.js43
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-3.js44
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-1.js55
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-2.js55
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-1.js56
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-2.js56
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-1.js55
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-2.js56
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-3.js56
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-4.js56
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_5-4-1.js51
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-1.js52
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-2.js50
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-1.js52
-rw-r--r--test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-2.js50
-rw-r--r--test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-1.js42
-rw-r--r--test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-2.js43
-rw-r--r--test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-3.js43
-rw-r--r--test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-4.js43
-rw-r--r--test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-4-1.js54
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-0-1.js44
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-1.js35
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-2.js37
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-3.js35
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-4.js35
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-5.js35
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-6.js35
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-1.js36
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-2.js41
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-3.js36
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-1.js49
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-10.js51
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-11.js42
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-12.js41
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-13.js48
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-14.js41
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-15.js41
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-16.js38
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-17.js43
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-2.js52
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-3.js48
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-4.js40
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-5.js45
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-6.js45
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-7.js40
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-8.js44
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-9.js39
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-1.js37
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-2.js40
-rw-r--r--test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-3.js37
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-1.js43
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-10.js45
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-11.js47
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-12.js45
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-3.js39
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-7.js43
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-8.js38
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-0-9.js46
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-2-1.js44
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-2-2.js44
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-2-3.js44
-rw-r--r--test/suite/ietestcenter/chapter12/12.10/12.10-7-1.js49
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-1.js41
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-10.js48
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-11.js50
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-12.js48
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-13.js56
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-2.js42
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-3.js49
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-4.js53
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-5.js52
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-6.js52
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-7.js62
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-8.js53
-rw-r--r--test/suite/ietestcenter/chapter12/12.14/12.14-9.js49
-rw-r--r--test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-11.js33
-rw-r--r--test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-12.js33
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.6/15.10.6.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js33
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js33
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js33
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js33
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js33
-rw-r--r--test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12-0-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12-0-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12-0-3.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12-0-4.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-1.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-2.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-1.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-2.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-10.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-11.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-12.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-13.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-14.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-15.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-2.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-3.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-4.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-5.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-6.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-7.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-8.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-9.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-4-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-a-i-1.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-b-i-1.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-1.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-2.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-1.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-2.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-3.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-4.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-7-a-1.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-1.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-2.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-3.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-4.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-5.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-2.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-3.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.1/15.2.3.1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-12.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-119.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-12.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-13.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-137.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-164.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-74.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-122.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-150.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-176.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-201.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-229.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-233.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-234.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-259.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-263.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-264.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-44.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-69.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-97.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js68
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-14.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-5.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-9.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-400.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-401.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js80
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js80
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-44.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js68
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js68
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js68
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-14.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-5.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js76
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js72
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js76
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js76
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js86
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js95
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js77
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js86
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js72
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js33
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-16.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-16.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-20.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-24.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-16.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-16.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-20.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-24.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js37
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js69
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js77
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-14.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-15.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js68
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js76
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-14.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-15.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js69
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-14.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-15.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js72
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-14.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-15.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js69
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js68
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js69
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js71
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-25.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-26.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-14.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-15.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js69
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js70
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-15.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js62
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-6.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js66
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js64
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js67
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js69
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js63
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js68
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js73
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js69
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js79
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js45
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js65
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js56
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js46
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js59
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js61
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js52
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js57
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-15.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js55
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js51
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js49
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js48
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js54
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js60
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-6.js53
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js58
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js50
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js47
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js44
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js43
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js40
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js41
-rw-r--r--test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-1.js34
-rw-r--r--test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-2.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js42
-rw-r--r--test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js38
-rw-r--r--test/suite/ietestcenter/chapter15/15.7/15.7.4/15.7.4-1.js39
-rw-r--r--test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js36
-rw-r--r--test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js35
-rw-r--r--test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js38
3413 files changed, 165054 insertions, 0 deletions
diff --git a/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-1.js b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-1.js
new file mode 100644
index 000000000..9c34687f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+var __10_4_2_1_1_1 = "str";
+
+ES5Harness.registerTest( {
+id: "10.4.2-1-1",
+
+path: "TestCases/chapter10/10.4/10.4.2/10.4.2-1-1.js",
+
+description: "Indirect call to eval has context set to global context",
+
+test: function testcase() {
+ var _eval = eval;
+ var __10_4_2_1_1_1 = "str1";
+ if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval
+ eval("\'str1\' === __10_4_2_1_1_1") === true) // direct eval
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-2.js b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-2.js
new file mode 100644
index 000000000..020f5cc7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+var __10_4_2_1_2 = "str";
+
+ES5Harness.registerTest( {
+id: "10.4.2-1-2",
+
+path: "TestCases/chapter10/10.4/10.4.2/10.4.2-1-2.js",
+
+description: "Indirect call to eval has context set to global context (nested function)",
+
+test: function testcase() {
+ var _eval = eval;
+ var __10_4_2_1_2 = "str1";
+ function foo()
+ {
+ var __10_4_2_1_2 = "str2";
+ if(_eval("\'str\' === __10_4_2_1_2") === true && // indirect eval
+ eval("\'str2\' === __10_4_2_1_2") === true) // direct eval
+ return true;
+ }
+ return foo();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-3.js b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-3.js
new file mode 100644
index 000000000..f34219531
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+var __10_4_2_1_3 = "str";
+
+ES5Harness.registerTest( {
+id: "10.4.2-1-3",
+
+path: "TestCases/chapter10/10.4/10.4.2/10.4.2-1-3.js",
+
+description: "Indirect call to eval has context set to global context (catch block)",
+
+test: function testcase() {
+
+ var _eval = eval;
+ var __10_4_2_1_3 = "str1";
+ try
+ {
+ throw "error";
+ }
+ catch(e)
+ {
+ var __10_4_2_1_3 = "str2";
+ if(_eval("\'str\' === __10_4_2_1_3") === true && // indirect eval
+ eval("\'str2\' === __10_4_2_1_3") === true) // direct eval
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-4.js b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-4.js
new file mode 100644
index 000000000..d87bb5bf5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+var __10_4_2_1_4 = "str";
+
+
+ES5Harness.registerTest( {
+id: "10.4.2-1-4",
+
+path: "TestCases/chapter10/10.4/10.4.2/10.4.2-1-4.js",
+
+description: "Indirect call to eval has context set to global context (with block)",
+
+test: function testcase() {
+ var o = new Object();
+ o.__10_4_2_1_4 = "str2";
+ var _eval = eval;
+ var __10_4_2_1_4 = "str1";
+ with(o)
+ {
+ if(_eval("\'str\' === __10_4_2_1_4") === true && // indirect eval
+ eval("\'str2\' === __10_4_2_1_4") === true) // direct eval
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-5.js b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-5.js
new file mode 100644
index 000000000..5fa841894
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-1-5.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+var __10_4_2_1_5 = "str";
+
+
+ES5Harness.registerTest( {
+id: "10.4.2-1-5",
+
+path: "TestCases/chapter10/10.4/10.4.2/10.4.2-1-5.js",
+
+description: "Indirect call to eval has context set to global context (inside another eval)",
+
+test: function testcase() {
+ var __10_4_2_1_5 = "str1";
+ var r = eval("\
+ var _eval = eval; \
+ var __10_4_2_1_5 = \'str2\'; \
+ _eval(\"\'str\' === __10_4_2_1_5 \") && \
+ eval(\"\'str2\' === __10_4_2_1_5\")\
+ ");
+ if(r == true)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-2-c-1.js b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-2-c-1.js
new file mode 100644
index 000000000..e3821df73
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.4/10.4.2/10.4.2-2-c-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.4.2-2-c-1",
+
+path: "TestCases/chapter10/10.4/10.4.2/10.4.2-2-c-1.js",
+
+description: "Direct val code in non-strict mode - can instantiate variable in calling context",
+
+test: function testcase() {
+  var x = 0;
+  return function inner() {
+ eval("var x = 1");
+ if (x === 1)
+ return true;
+ } ();
+ }
+
+});
+
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-1.js b/test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-1.js
new file mode 100644
index 000000000..7fc8f62cc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-1.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-10-c-ii-1",
+
+path: "TestCases/chapter10/10.6/10.6-10-c-ii-1.js",
+
+description: "arguments[i] change with actual parameters",
+
+test: function testcase() {
+ function foo(a,b,c)
+ {
+ a = 1; b = 'str'; c = 2.1;
+ if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1)
+ return true;
+ }
+ return foo(10,'sss',1);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-2.js b/test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-2.js
new file mode 100644
index 000000000..5de79ca09
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-10-c-ii-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-10-c-ii-2",
+
+path: "TestCases/chapter10/10.6/10.6-10-c-ii-2.js",
+
+description: "arguments[i] map to actual parameter",
+
+test: function testcase() {
+
+ function foo(a,b,c)
+ {
+ arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1;
+ if(1 === a && 'str' === b && 2.1 === c)
+ return true;
+ }
+ return foo(10,'sss',1);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-12-1.js b/test/suite/ietestcenter/chapter10/10.6/10.6-12-1.js
new file mode 100644
index 000000000..eba3e5952
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-12-1.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-12-1",
+
+path: "TestCases/chapter10/10.6/10.6-12-1.js",
+
+description: "Accessing callee property of Arguments object is allowed",
+
+test: function testcase() {
+ try
+ {
+ arguments.callee;
+ return true;
+ }
+ catch (e) {
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-12-2.js b/test/suite/ietestcenter/chapter10/10.6/10.6-12-2.js
new file mode 100644
index 000000000..e41aa06f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-12-2.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-12-2",
+
+path: "TestCases/chapter10/10.6/10.6-12-2.js",
+
+description: "arguments.callee has correct attributes",
+
+test: function testcase() {
+
+ var desc = Object.getOwnPropertyDescriptor(arguments,"callee");
+ if(desc.configurable === true &&
+ desc.enumerable === false &&
+ desc.writable === true &&
+ desc.hasOwnProperty('get') == false &&
+ desc.hasOwnProperty('put') == false)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-13-1.js b/test/suite/ietestcenter/chapter10/10.6/10.6-13-1.js
new file mode 100644
index 000000000..487ca461a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-13-1.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-13-1",
+
+path: "TestCases/chapter10/10.6/10.6-13-1.js",
+
+description: "Accessing caller property of Arguments object is allowed",
+
+test: function testcase() {
+ try
+ {
+ arguments.caller;
+ return true;
+ }
+ catch (e) {
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-5-1.js b/test/suite/ietestcenter/chapter10/10.6/10.6-5-1.js
new file mode 100644
index 000000000..623cb305d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-5-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-5-1",
+
+path: "TestCases/chapter10/10.6/10.6-5-1.js",
+
+description: "[[Prototype]] property of Arguments is set to Object prototype object",
+
+test: function testcase() {
+ if(Object.getPrototypeOf(arguments) === Object.getPrototypeOf({}))
+ return true;
+ },
+precondition: function () {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-6-1.js b/test/suite/ietestcenter/chapter10/10.6/10.6-6-1.js
new file mode 100644
index 000000000..82116c30a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-6-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-6-1",
+
+path: "TestCases/chapter10/10.6/10.6-6-1.js",
+
+description: "'length property of arguments object exists",
+
+test: function testcase() {
+
+ var desc = Object.getOwnPropertyDescriptor(arguments,"length");
+ return desc !== undefined
+ },
+
+precondition: function () {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-6-2.js b/test/suite/ietestcenter/chapter10/10.6/10.6-6-2.js
new file mode 100644
index 000000000..74314af5b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-6-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-6-2",
+
+path: "TestCases/chapter10/10.6/10.6-6-2.js",
+
+description: "'length' property of arguments object has correct attributes",
+
+test: function testcase() {
+
+ var desc = Object.getOwnPropertyDescriptor(arguments,"length");
+ if(desc.configurable === true &&
+ desc.enumerable === false &&
+ desc.writable === true )
+ return true;
+ },
+
+precondition: function () {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-6-3.js b/test/suite/ietestcenter/chapter10/10.6/10.6-6-3.js
new file mode 100644
index 000000000..1ee1b3709
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-6-3.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-6-3",
+
+path: "TestCases/chapter10/10.6/10.6-6-3.js",
+
+description: "'length' property of arguments object for 0 argument function exists",
+
+test: function testcase() {
+ var arguments= undefined;
+ return (function () {return arguments.length !== undefined})();
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter10/10.6/10.6-6-4.js b/test/suite/ietestcenter/chapter10/10.6/10.6-6-4.js
new file mode 100644
index 000000000..2e0f81e79
--- /dev/null
+++ b/test/suite/ietestcenter/chapter10/10.6/10.6-6-4.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "10.6-6-4",
+
+path: "TestCases/chapter10/10.6/10.6-6-4.js",
+
+description: "'length' property of arguments object for 0 argument function call is 0 even with formal parameters",
+
+test: function testcase() {
+ var arguments= undefined;
+ return (function (a,b,c) {return arguments.length === 0})();
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.4/11.1.4-0.js b/test/suite/ietestcenter/chapter11/11.1/11.1.4/11.1.4-0.js
new file mode 100644
index 000000000..2c4262b77
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.4/11.1.4-0.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.1.4-0",
+
+path: "TestCases/chapter11/11.1/11.1.4/11.1.4-0.js",
+
+description: "elements elided at the end of an array do not contribute to its length",
+
+test: function testcase() {
+ var a = [,];
+ if (a.length === 1) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-1.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-1.js
new file mode 100644
index 000000000..a767c2655
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/* it isn't clear what specific requirements of the specificaiton are being tested here. This test should
+probably be replaced by some more targeted tests. AllenWB */
+
+ES5Harness.registerTest( {
+id: "11.1.5-0-1",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5-0-1.js",
+
+description: "Object literal - get set property",
+
+test: function testcase() {
+ var s1 = "In getter";
+ var s2 = "In setter";
+ var s3 = "Modified by setter";
+ eval("var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}};");
+ if(o.foo !== s1)
+ return false;
+ o.foo=10;
+ if(s2 !== s3)
+ return false;
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-2.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-2.js
new file mode 100644
index 000000000..3cf7418be
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5-0-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/* it isn't clear what specific requirements of the specificaiton are being tested here. This test should
+probably be replaced by some more targeted tests. AllenWB */
+
+
+ES5Harness.registerTest( {
+id: "11.1.5-0-2",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5-0-2.js",
+
+description: "Object literal - multiple get set properties",
+
+test: function testcase() {
+ var s1 = "First getter";
+ var s2 = "First setter";
+ var s3 = "Second getter";
+ eval("var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}, get bar(){ return s3}, set bar(arg){ s3 = arg;}};");
+ if(o.foo !== s1)
+ return false;
+ o.foo = 10;
+ if(s2 !== s3)
+ return false;
+ if(o.bar !== s3)
+ return false;
+ o.bar = "Second setter";
+ if(o.bar !== "Second setter")
+ return false;
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-2.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-2.js
new file mode 100644
index 000000000..5ab414082
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-2.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-a-2",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-a-2.js",
+
+description: "Object literal - Duplicate data property name allowed if not in strict mode",
+
+test: function testcase() {
+
+ eval("({foo:0,foo:1});");
+ return true;
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-3.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-3.js
new file mode 100644
index 000000000..5c3fcf6f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-a-3.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ a. This production is contained in strict code and IsDataDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-a-3",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-a-3.js",
+
+description: "Object literal - Duplicate data property name allowed gets last defined value",
+
+test: function testcase() {
+
+ var o = eval("({foo:0,foo:1});");
+ return o.foo===1;
+ }
+
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-1.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-1.js
new file mode 100644
index 000000000..e2d1bcadb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-1.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true.
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-b-1",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-b-1.js",
+
+description: "Object literal - SyntaxError if a data property definition is followed by get accessor definition with the same name",
+
+test: function testcase() {
+ try
+ {
+ eval("({foo : 1, get foo(){}});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return true;
+}
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-2.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-2.js
new file mode 100644
index 000000000..1cb1a1c29
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-b-2.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true.
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-b-2",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-b-2.js",
+
+description: "Object literal - SyntaxError if a data property definition is followed by set accessor definition with the same name",
+
+test: function testcase() {
+ try
+ {
+ eval("({foo : 1, set foo(x){}});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return true;
+}
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-1.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-1.js
new file mode 100644
index 000000000..4053f71c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-c-1",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-c-1.js",
+
+description: "Object literal - SyntaxError if a get accessor property definition is followed by a data property definition with the same name",
+
+test: function testcase() {
+ try
+ {
+ eval("({get foo(){}, foo : 1});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return true;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-2.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-2.js
new file mode 100644
index 000000000..c6934c596
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-c-2.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-c-2",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-c-2.js",
+
+description: "Object literal - SyntaxError if a set accessor property definition is followed by a data property definition with the same name",
+
+test: function testcase() {
+ try
+ {
+ eval("({set foo(x){}, foo : 1});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false};
+ return true;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-1.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-1.js
new file mode 100644
index 000000000..0bdeea058
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-1.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-d-1",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-1.js",
+
+description: "Object literal - SyntaxError for duplicate property name (get,get)",
+
+test: function testcase() {
+ try
+ {
+ eval("({get foo(){}, get foo(){}});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return true;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-2.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-2.js
new file mode 100644
index 000000000..0c219bd09
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-2.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-d-2",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-2.js",
+
+description: "Object literal - SyntaxError for duplicate property name (set,set)",
+
+test: function testcase() {
+ try
+ {
+ eval("({set foo(arg){}, set foo(arg1){}});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return true;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-3.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-3.js
new file mode 100644
index 000000000..80b6f1696
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-3.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-d-3",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-3.js",
+
+description: "Object literal - SyntaxError for duplicate property name (get,set,get)",
+
+test: function testcase() {
+ try
+ {
+ eval("({get foo(){}, set foo(arg){}, get foo(){}});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return true;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-4.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-4.js
new file mode 100644
index 000000000..d56ae6b42
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_4-4-d-4.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyNameAndValueList : PropertyNameAndValueList , PropertyAssignment
+ 4. If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
+ d. IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true and either both previous and propId.descriptor have [[Get]] fields or both previous and propId.descriptor have [[Set]] fields
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_4-4-d-4",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-4.js",
+
+description: "Object literal - SyntaxError for duplicate property name (set,get,set)",
+
+test: function testcase() {
+ try
+ {
+ eval("({set foo(arg){}, get foo(){}, set foo(arg1){}});");
+ }
+ catch(e)
+ {
+ if(e instanceof SyntaxError)
+ return true;
+ }
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return true;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_5-4-1.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_5-4-1.js
new file mode 100644
index 000000000..57671b89e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_5-4-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyAssignment : PropertyName : AssignmentExpression
+ 4.Let desc be the Property Descriptor{[[Value]]: propValue, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_5-4-1",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_5-4-1.js",
+
+description: "Object literal - property descriptor for assignment expression",
+
+test: function testcase() {
+
+ var o = {foo : 1};
+ var desc = Object.getOwnPropertyDescriptor(o,"foo");
+ if(desc.value === 1 &&
+ desc.writable === true &&
+ desc.enumerable === true &&
+ desc.configurable === true)
+ return true;
+ },
+
+precondition: function () {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-1.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-1.js
new file mode 100644
index 000000000..293420cc7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyAssignment : get PropertyName ( ) { FunctionBody }
+ 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true}
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_6-3-1",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_6-3-1.js",
+
+description: "Object literal - property descriptor for get property assignment",
+
+test: function testcase() {
+
+ eval("var o = {get foo(){return 1;}};");
+ var desc = Object.getOwnPropertyDescriptor(o,"foo");
+ if(desc.enumerable === true &&
+ desc.configurable === true)
+ return true;
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return fnExists(Object.getOwnPropertyDescriptor);
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-2.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-2.js
new file mode 100644
index 000000000..45663f3c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_6-3-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyAssignment : get PropertyName ( ) { FunctionBody }
+ 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true}
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_6-3-2",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_6-3-2.js",
+
+description: "Object literal - property descriptor for get property assignment should not create a set function",
+
+test: function testcase() {
+
+ eval("var o = {get foo(){return 1;}};");
+ var desc = Object.getOwnPropertyDescriptor(o,"foo");
+ return desc.set === undefined
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return fnExists(Object.getOwnPropertyDescriptor);;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-1.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-1.js
new file mode 100644
index 000000000..08cb35bb4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyAssignment : set PropertyName( PropertySetParameterList ) { FunctionBody }
+ 3.Let desc be the Property Descriptor{[[Set]]: closure, [[Enumerable]]: true, [[Configurable]]: true}
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_7-3-1",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_7-3-1.js",
+
+description: "Object literal - property descriptor for set property assignment",
+
+test: function testcase() {
+
+ eval("var o = {set foo(arg){return 1;}};");
+ var desc = Object.getOwnPropertyDescriptor(o,"foo");
+ if(desc.enumerable === true &&
+ desc.configurable === true)
+ return true;
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return fnExists(Object.getOwnPropertyDescriptor);;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-2.js b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-2.js
new file mode 100644
index 000000000..609d41a27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.1/11.1.5/11.1.5_7-3-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+/*
+ Refer 11.1.5;
+ The production
+ PropertyAssignment : get PropertyName ( ) { FunctionBody }
+ 3.Let desc be the Property Descriptor{[[Get]]: closure, [[Enumerable]]: true, [[Configurable]]: true}
+*/
+
+ES5Harness.registerTest( {
+id: "11.1.5_7-3-2",
+
+path: "TestCases/chapter11/11.1/11.1.5/11.1.5_7-3-2.js",
+
+description: "Object literal - property descriptor for set property assignment should not create a get function",
+
+test: function testcase() {
+
+ eval("var o = {set foo(arg){}};");
+ var desc = Object.getOwnPropertyDescriptor(o,"foo");
+ return desc.get === undefined
+ },
+
+precondition: function () {
+ //accessor properties in object literals must be allowed
+ try {eval("({set foo(x) {}, get foo(){}});");}
+ catch(e) {return false}
+ return fnExists(Object.getOwnPropertyDescriptor);;
+}
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-1.js b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-1.js
new file mode 100644
index 000000000..1611f6997
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+PutValue operates only on references (see step 1)
+*/
+
+ES5Harness.registerTest( {
+id: "11.13.1-1-1",
+
+path: "TestCases/chapter11/11.13/11.13.1/11.13.1-1-1.js",
+
+description: "simple assignment throws ReferenceError if LeftHandSide is not a reference (number)",
+
+test: function testcase() {
+ try {
+ eval("42 = 42");
+ }
+ catch (e) {
+ if (e instanceof ReferenceError) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-2.js b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-2.js
new file mode 100644
index 000000000..2f2791e08
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-2.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+PutValue operates only on references (see step 1).
+*/
+
+
+ES5Harness.registerTest( {
+id: "11.13.1-1-2",
+
+path: "TestCases/chapter11/11.13/11.13.1/11.13.1-1-2.js",
+
+description: "simple assignment throws ReferenceError if LeftHandSide is not a reference (string)",
+
+test: function testcase() {
+ try {
+ eval("'x' = 42");
+ }
+ catch (e) {
+ if (e instanceof ReferenceError) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-3.js b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-3.js
new file mode 100644
index 000000000..865c38a91
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-3.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+PutValue operates only on references (see step 1).
+*/
+
+
+ES5Harness.registerTest( {
+id: "11.13.1-1-3",
+
+path: "TestCases/chapter11/11.13/11.13.1/11.13.1-1-3.js",
+
+description: "simple assignment throws ReferenceError if LeftHandSide is not a reference (boolean)",
+
+test: function testcase() {
+ try {
+ eval("true = 42");
+ }
+ catch (e) {
+ if (e instanceof ReferenceError) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-4.js b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-4.js
new file mode 100644
index 000000000..d332b8c77
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-1-4.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+PutValue operates only on references (see step 1).
+*/
+
+
+ES5Harness.registerTest( {
+id: "11.13.1-1-4",
+
+path: "TestCases/chapter11/11.13/11.13.1/11.13.1-1-4.js",
+
+description: "simple assignment throws ReferenceError if LeftHandSide is not a reference (null)",
+
+test: function testcase() {
+ try {
+ eval("null = 42");
+ }
+ catch (e) {
+ if (e instanceof ReferenceError) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-4-1.js b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-4-1.js
new file mode 100644
index 000000000..ccab43da3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.13/11.13.1/11.13.1-4-1.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+PutValue operates only on references (see step 3.b).
+*/
+
+
+ES5Harness.registerTest( {
+id: "11.13.1-4-1",
+
+path: "TestCases/chapter11/11.13/11.13.1/11.13.1-4-1.js",
+
+description: "simple assignment creates property on the global object if LeftHandSide is an unresolvable reference",
+
+test: function testcase() {
+ function foo() {
+ __ES3_1_test_suite_test_11_13_1_unique_id_3__ = 42;
+ }
+ foo();
+
+ // in the browser, the "window" serves as the global object.
+ var desc = Object.getOwnPropertyDescriptor(window, '__ES3_1_test_suite_test_11_13_1_unique_id_3__');
+ if (desc.value === 42 &&
+ desc.writable === true &&
+ desc.enumerable === true &&
+ desc.configurable === true) {
+ delete __ES3_1_test_suite_test_11_13_1_unique_id_3__;
+ return true;
+ }
+ },
+
+precondition: function () {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-0-1.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-0-1.js
new file mode 100644
index 000000000..752b5cc0b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-0-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-0-1",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-0-1.js",
+
+description: "delete operator as UnaryExpression",
+
+test: function testcase() {
+ var x = 1;
+ var y = 2;
+ var z = 3;
+
+ if( (!delete x || delete y) &&
+ delete delete z)
+ {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-1.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-1.js
new file mode 100644
index 000000000..a0dce8dff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-2-1",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-2-1.js",
+
+description: "delete operator returns true when deleting a non-reference (number)",
+
+test: function testcase() {
+ var d = delete 42;
+ if (d === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-2.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-2.js
new file mode 100644
index 000000000..42809c607
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-2.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-2-2",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-2-2.js",
+
+description: "delete operator returns true when deleting returned value from a function",
+
+test: function testcase() {
+ var bIsFooCalled = false;
+ var foo = function(){bIsFooCalled = true;};
+
+ var d = delete foo();
+ if(d === true && bIsFooCalled === true)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-3.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-3.js
new file mode 100644
index 000000000..ff75f7467
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-3.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-2-3",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-2-3.js",
+
+description: "delete operator returns true when deleting a non-reference (boolean)",
+
+test: function testcase() {
+ var d = delete true;
+ if (d === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-4.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-4.js
new file mode 100644
index 000000000..2a78df8c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-4.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-2-4",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-2-4.js",
+
+description: "delete operator returns true when deleting a non-reference (string)",
+
+test: function testcase() {
+ var d = delete "abc";
+ if (d === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-5.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-5.js
new file mode 100644
index 000000000..8c55da0bd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-5.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-2-5",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-2-5.js",
+
+description: "delete operator returns true when deleting a non-reference (obj)",
+
+test: function testcase() {
+ var d = delete {a:0} ;
+ if (d === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-6.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-6.js
new file mode 100644
index 000000000..3845af7f9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-2-6.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-2-6",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-2-6.js",
+
+description: "delete operator returns true when deleting a non-reference (null)",
+
+test: function testcase() {
+ var d = delete null;
+ if (d === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-1.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-1.js
new file mode 100644
index 000000000..2763f90a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-3-1",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-3-1.js",
+
+description: "delete operator returns true when deleting an unresolvable reference",
+
+test: function testcase() {
+ // just cooking up a long/veryLikely unique name
+ var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_0__;
+ if (d === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-2.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-2.js
new file mode 100644
index 000000000..f2b475cf6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-3-2",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-3-2.js",
+
+description: "delete operator throws ReferenceError when deleting an explicitly qualified yet unresolvable reference (base obj undefined)",
+
+test: function testcase() {
+ // just cooking up a long/veryLikely unique name
+ try
+ {
+ var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_2__.x;
+ }
+ catch(e)
+ {
+ if (e instanceof ReferenceError)
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-3.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-3.js
new file mode 100644
index 000000000..c121677b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-3-3.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-3-3",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-3-3.js",
+
+description: "delete operator returns true when deleting an explicitly qualified yet unresolvable reference (property undefined for base obj)",
+
+test: function testcase() {
+ var __ES3_1_test_suite_test_11_4_1_3_unique_id_3__ = {};
+ var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_3__.x;
+ if (d === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-1.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-1.js
new file mode 100644
index 000000000..bee271d5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-1",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-1.js",
+
+description: "delete operator returns true when deleting a configurable data property",
+
+test: function testcase() {
+ var o = {};
+
+ var desc = { value: 1, configurable: true };
+ Object.defineProperty(o, "foo", desc);
+
+ var d = delete o.foo;
+ if (d === true && o.hasOwnProperty("foo") === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return (fnExists(Object.defineProperty) && fnExists(Object.hasOwnProperty));
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-10.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-10.js
new file mode 100644
index 000000000..741feee25
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-10.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-10",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-10.js",
+
+description: "delete operator returns true for property (stringify) defined on built-in object (JSON)",
+
+test: function testcase() {
+ try {
+ var o = JSON.stringify;
+ var desc;
+ try {
+ desc = Object.getOwnPropertyDescriptor(JSON, 'stringify')
+ }
+ catch (e) {
+ };
+ var d = delete JSON.stringify;
+ if (d === true && JSON.stringify === undefined) {
+ return true;
+ }
+ } finally {
+ if (desc) Object.defineProperty(JSON, 'stringify', desc)
+ else JSON.stringify = o /* this branch messes up the attributes */;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-11.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-11.js
new file mode 100644
index 000000000..0c779517e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-11.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-11",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-11.js",
+
+description: "delete operator returns true on deleting arguments propterties(arguments.callee)",
+
+test: function testcase() {
+ function foo(a,b)
+ {
+ return (delete arguments.callee);
+ }
+ var d = delete arguments.callee;
+ if(d === true && arguments.callee === undefined)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-12.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-12.js
new file mode 100644
index 000000000..705cc5f0b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-12.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-12",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-12.js",
+
+description: "delete operator returns false when deleting a property(length)",
+
+test: function testcase() {
+
+ var a = [1,2,3]
+ a.x = 10;
+ var d = delete a.length
+ if(d === false && a.length === 3)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-13.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-13.js
new file mode 100644
index 000000000..16015de6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-13.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-13",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-13.js",
+
+description: "delete operator returns false when deleting Array object",
+
+test: function testcase() {
+
+ var a = [1,2,3]
+ a.x = 10;
+
+ var d = delete a
+
+ if(d === false && Array.isArray(a) === true)
+ return true;
+ },
+
+precondition: function () {
+ return fnExists(Array.isArray);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-14.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-14.js
new file mode 100644
index 000000000..74c21b23f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-14.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-14",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-14.js",
+
+description: "delete operator returns true when deleting Array elements",
+
+test: function testcase() {
+
+ var a = [1,2,3]
+ a.x = 10;
+ var d = delete a[1]
+ if(d === true && a[1] === undefined)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-15.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-15.js
new file mode 100644
index 000000000..489c7b49d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-15.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-15",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-15.js",
+
+description: "delete operator returns true when deleting Array expandos",
+
+test: function testcase() {
+
+ var a = [1,2,3]
+ a.x = 10;
+ var d = delete a.x;
+ if( d === true && a.x === undefined)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-16.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-16.js
new file mode 100644
index 000000000..94d41872f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-16.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-16",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-16.js",
+
+description: "delete operator returns false on deleting arguments object",
+
+test: function testcase() {
+
+ if(delete arguments === false && arguments !== undefined)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-17.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-17.js
new file mode 100644
index 000000000..2a99cda53
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-17.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-17",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-17.js",
+
+description: "delete operator returns true on deleting a arguments element",
+
+test: function testcase() {
+ function foo(a,b)
+ {
+ var d = delete arguments[0];
+ return (d === true && arguments[0] === undefined);
+ }
+
+ if(foo(1,2) === true)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-2.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-2.js
new file mode 100644
index 000000000..61c957d3b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-2.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-2",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-2.js",
+
+description: "delete operator returns true when deleting a configurable accessor property",
+
+test: function testcase() {
+ var o = {};
+
+ // define an accessor
+ // dummy getter
+ var getter = function () { return 1; }
+ var desc = { get: getter, configurable: true };
+ Object.defineProperty(o, "foo", desc);
+
+ var d = delete o.foo;
+ if (d === true && o.hasOwnProperty("foo") === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return (fnExists(Object.defineProperty) && fnExists(Object.hasOwnProperty));
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-3.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-3.js
new file mode 100644
index 000000000..b22b3fd3d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-3",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-3.js",
+
+description: "delete operator returns false when deleting a non-configurable data property",
+
+test: function testcase() {
+ var o = {};
+ var desc = { value : 1, configurable: false }; // all other attributes default to false
+ Object.defineProperty(o, "foo", desc);
+
+ // Now, deleting o.foo should fail because [[Configurable]] on foo is false.
+ var d = delete o.foo;
+ if (d === false && o.hasOwnProperty("foo") === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return (fnExists(Object.defineProperty) && fnExists(Object.hasOwnProperty));
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-4.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-4.js
new file mode 100644
index 000000000..f867969c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-4",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-4.js",
+
+description: "delete operator returns false when deleting a non-configurable data property (NaN)",
+
+test: function testcase() {
+ // NaN (15.1.1.1) has [[Configurable]] set to false.
+ var d = delete NaN;
+ if (d === false) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-5.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-5.js
new file mode 100644
index 000000000..03606209e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-5",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-5.js",
+
+description: "delete operator returns false when deleting the environment object inside 'with'",
+
+test: function testcase() {
+ var o = new Object();
+ o.x = 1;
+ var d;
+ with(o)
+ {
+ d = delete o;
+ }
+ if (d === false && typeof(o) === 'object' && o.x === 1) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-6.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-6.js
new file mode 100644
index 000000000..245c267c2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-6",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-6.js",
+
+description: "delete operator returns true when deleting a property inside 'with'",
+
+test: function testcase() {
+ var o = new Object();
+ o.x = 1;
+ var d;
+ with(o)
+ {
+ d = delete x;
+ }
+ if (d === true && o.x === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-7.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-7.js
new file mode 100644
index 000000000..881a9b684
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-7.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-7",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-7.js",
+
+description: "delete operator inside 'eval'",
+
+test: function testcase() {
+ var x = 1;
+ var d = eval("delete x");
+ if (d === false && x === 1) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-8.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-8.js
new file mode 100644
index 000000000..a55f28f77
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-8.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-8",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-8.js",
+
+description: "delete operator returns true for built-in objects (JSON)",
+
+test: function testcase() {
+ try {
+ var o = JSON;
+ var d = delete JSON;
+ if (d === true) {
+ return true;
+ }
+ } finally {
+ JSON = o;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-9.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-9.js
new file mode 100644
index 000000000..2f1dcaa92
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-4.a-9.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test is actually testing the [[Delete]] internal method (8.12.8). Since the
+language provides no way to directly exercise [[Delete]], the tests are placed here.
+*/
+
+ES5Harness.registerTest( {
+id: "11.4.1-4.a-9",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-9.js",
+
+description: "delete operator returns false when deleting a non-configurable data property (Math.LN2)",
+
+test: function testcase() {
+ var d = delete Math.LN2;
+ if (d === false) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-1.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-1.js
new file mode 100644
index 000000000..02af8294e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-1.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-5-1",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-5-1.js",
+
+description: "delete operator returns false when deleting a direct reference to a var",
+
+test: function testcase() {
+ var x = 1;
+
+ // Now, deleting 'x' directly should fail;
+ var d = delete x;
+ if(d === false && x === 1)
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-2.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-2.js
new file mode 100644
index 000000000..db59bf2e3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-5-2",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-5-2.js",
+
+description: "delete operator returns false when deleting a direct reference to a function argument",
+
+test: function testcase() {
+
+ function foo(a,b) {
+
+ // Now, deleting 'a' directly should fail
+ // because 'a' is direct reference to a function argument;
+ var d = delete a;
+ return (d === false && a === 1);
+ }
+ return foo(1,2);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-3.js b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-3.js
new file mode 100644
index 000000000..b5ed647ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter11/11.4/11.4.1/11.4.1-5-3.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "11.4.1-5-3",
+
+path: "TestCases/chapter11/11.4/11.4.1/11.4.1-5-3.js",
+
+description: "delete operator returns false when deleting a direct reference to a function name",
+
+test: function testcase() {
+ var foo = function(){};
+
+ // Now, deleting 'foo' directly should fail;
+ var d = delete foo;
+ if(d === false && fnExists(foo))
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-1.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-1.js
new file mode 100644
index 000000000..6b8d3275f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"; AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-1",
+
+path: "TestCases/chapter12/12.10/12.10-0-1.js",
+
+description: "with does not change declaration scope - vars in with are visible outside",
+
+test: function testcase() {
+ var o = {};
+ var f = function () {
+ /* capture foo binding before executing with */
+ return foo;
+ }
+
+ with (o) {
+ var foo = "12.10-0-1";
+ }
+
+ return f()==="12.10-0-1"
+
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-10.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-10.js
new file mode 100644
index 000000000..d9a63c3d2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-10.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-10",
+
+path: "TestCases/chapter12/12.10/12.10-0-10.js",
+
+description: "with introduces scope - name lookup finds function parameter",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o, x) {
+ with (o) {
+ return x;
+ }
+ }
+
+ return innerf(o, 42);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-11.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-11.js
new file mode 100644
index 000000000..edbc73b63
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-11",
+
+path: "TestCases/chapter12/12.10/12.10-0-11.js",
+
+description: "with introduces scope - name lookup finds inner variable",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o) {
+ var x = 42;
+
+ with (o) {
+ return x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-12.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-12.js
new file mode 100644
index 000000000..0ef2f0efa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-12.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-12",
+
+path: "TestCases/chapter12/12.10/12.10-0-12.js",
+
+description: "with introduces scope - name lookup finds property",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o) {
+ with (o) {
+ return x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({x:42}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-3.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-3.js
new file mode 100644
index 000000000..31c1c98fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-3.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-3",
+
+path: "TestCases/chapter12/12.10/12.10-0-3.js",
+
+description: "with introduces scope - that is captured by function expression",
+
+test: function testcase() {
+ var o = {prop: "12.10-0-3 before"};
+ var f;
+
+ with (o) {
+ f = function () { return prop; }
+ }
+ o.prop = "12.10-0-3 after";
+ return f()==="12.10-0-3 after"
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-7.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-7.js
new file mode 100644
index 000000000..5926fa723
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-7.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-7",
+
+path: "TestCases/chapter12/12.10/12.10-0-7.js",
+
+description: "with introduces scope - scope removed when exiting with statement",
+
+test: function testcase() {
+ var o = {foo: 1};
+
+ with (o) {
+ foo = 42;
+ }
+
+ try {
+ foo;
+ }
+ catch (e) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-8.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-8.js
new file mode 100644
index 000000000..14fe597db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-8.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-8",
+
+path: "TestCases/chapter12/12.10/12.10-0-8.js",
+
+description: "with introduces scope - var initializer sets like named property",
+
+test: function testcase() {
+ var o = {foo: 42};
+
+ with (o) {
+ var foo = "set in with";
+ }
+
+ return o.foo === "set in with";
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-0-9.js b/test/suite/ietestcenter/chapter12/12.10/12.10-0-9.js
new file mode 100644
index 000000000..1e77928f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-0-9.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-0-9",
+
+path: "TestCases/chapter12/12.10/12.10-0-9.js",
+
+description: "with introduces scope - name lookup finds outer variable",
+
+test: function testcase() {
+ function f(o) {
+ var x = 42;
+
+ function innerf(o) {
+ with (o) {
+ return x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-2-1.js b/test/suite/ietestcenter/chapter12/12.10/12.10-2-1.js
new file mode 100644
index 000000000..b9b329221
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-2-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-2-1",
+
+path: "TestCases/chapter12/12.10/12.10-2-1.js",
+
+description: "with - expression being Number",
+
+test: function testcase() {
+ var o = 2;
+ var foo = 1;
+ try
+ {
+ with (o) {
+ foo = 42;
+ }
+ }
+ catch(e)
+ {
+ }
+ return true;
+
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-2-2.js b/test/suite/ietestcenter/chapter12/12.10/12.10-2-2.js
new file mode 100644
index 000000000..c875a666b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-2-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-2-2",
+
+path: "TestCases/chapter12/12.10/12.10-2-2.js",
+
+description: "with - expression being Boolean",
+
+test: function testcase() {
+ var o = true;
+ var foo = 1;
+ try
+ {
+ with (o) {
+ foo = 42;
+ }
+ }
+ catch(e)
+ {
+ }
+ return true;
+
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-2-3.js b/test/suite/ietestcenter/chapter12/12.10/12.10-2-3.js
new file mode 100644
index 000000000..976ce7f90
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-2-3.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-2-3",
+
+path: "TestCases/chapter12/12.10/12.10-2-3.js",
+
+description: "with - expression being string",
+
+test: function testcase() {
+ var o = "str";
+ var foo = 1;
+ try
+ {
+ with (o) {
+ foo = 42;
+ }
+ }
+ catch(e)
+ {
+ }
+ return true;
+
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.10/12.10-7-1.js b/test/suite/ietestcenter/chapter12/12.10/12.10-7-1.js
new file mode 100644
index 000000000..7faa9d9f8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.10/12.10-7-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.10-7-1",
+
+path: "TestCases/chapter12/12.10/12.10-7-1.js",
+
+description: "with introduces scope - restores the earlier environment on exit",
+
+test: function testcase() {
+ var a = 1;
+
+ var o = {a : 2};
+ try
+ {
+ with (o) {
+ a = 3;
+ throw 1;
+ a = 4;
+ }
+ }
+ catch(e)
+ {}
+
+ if (a === 1 && o.a === 3) {
+ return true;
+ }
+
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-1.js b/test/suite/ietestcenter/chapter12/12.14/12.14-1.js
new file mode 100644
index 000000000..0ed1d6bf8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "12.14-1",
+
+path: "TestCases/chapter12/12.14/12.14-1.js",
+
+description: "catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter",
+
+test: function testcase() {
+ foo = "prior to throw";
+ try {
+ throw new Error();
+ }
+ catch (foo) {
+ var foo = "initializer in catch";
+ }
+ return foo === "prior to throw";
+
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-10.js b/test/suite/ietestcenter/chapter12/12.14/12.14-10.js
new file mode 100644
index 000000000..98e5103af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-10.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-10",
+
+path: "TestCases/chapter12/12.14/12.14-10.js",
+
+description: "catch introduces scope - name lookup finds function parameter",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o, x) {
+ try {
+ throw o;
+ }
+ catch (e) {
+ return x;
+ }
+ }
+
+ return innerf(o, 42);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-11.js b/test/suite/ietestcenter/chapter12/12.14/12.14-11.js
new file mode 100644
index 000000000..0f7c8e75b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-11",
+
+path: "TestCases/chapter12/12.14/12.14-11.js",
+
+description: "catch introduces scope - name lookup finds inner variable",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o) {
+ var x = 42;
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ return x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-12.js b/test/suite/ietestcenter/chapter12/12.14/12.14-12.js
new file mode 100644
index 000000000..1b7c4e7a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-12.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-12",
+
+path: "TestCases/chapter12/12.14/12.14-12.js",
+
+description: "catch introduces scope - name lookup finds property",
+
+test: function testcase() {
+ function f(o) {
+
+ function innerf(o) {
+ try {
+ throw o;
+ }
+ catch (e) {
+ return e.x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({x:42}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-13.js b/test/suite/ietestcenter/chapter12/12.14/12.14-13.js
new file mode 100644
index 000000000..4a54b8e79
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-13.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-13",
+
+path: "TestCases/chapter12/12.14/12.14-13.js",
+
+description: "catch introduces scope - updates are based on scope",
+
+test: function testcase() {
+ var res1 = false;
+ var res2 = false;
+ var res3 = false;
+
+ var x_12_14_13 = 'local';
+
+ function foo() {
+ this.x_12_14_13 = 'instance';
+ }
+
+ try {
+ throw foo;
+ }
+ catch (e) {
+ res1 = (x_12_14_13 === 'local');
+ e();
+ res2 = (x_12_14_13 === 'local');
+ }
+ res3 = (x_12_14_13 === 'local');
+
+ if (res1 === true &&
+ res2 === true &&
+ res3 === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-2.js b/test/suite/ietestcenter/chapter12/12.14/12.14-2.js
new file mode 100644
index 000000000..b72d4506a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "12.14-2",
+
+path: "TestCases/chapter12/12.14/12.14-2.js",
+
+description: "catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter",
+
+test: function testcase() {
+ function capturedFoo() {return foo};
+ foo = "prior to throw";
+ try {
+ throw new Error();
+ }
+ catch (foo) {
+ var foo = "initializer in catch";
+ return capturedFoo() !== "initializer in catch";
+ }
+
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-3.js b/test/suite/ietestcenter/chapter12/12.14/12.14-3.js
new file mode 100644
index 000000000..0df1b6b5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-3",
+
+path: "TestCases/chapter12/12.14/12.14-3.js",
+
+description: "catch doesn't change declaration scope - var declaration are visible outside when name different from catch parameter",
+
+test: function testcase() {
+ try {
+ throw new Error();
+ }
+ catch (e) {
+ var foo = "declaration in catch";
+ }
+
+ return foo === "declaration in catch";
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-4.js b/test/suite/ietestcenter/chapter12/12.14/12.14-4.js
new file mode 100644
index 000000000..4a11d3912
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-4.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-4",
+
+path: "TestCases/chapter12/12.14/12.14-4.js",
+
+description: "catch introduces scope - block-local vars must shadow outer vars",
+
+test: function testcase() {
+ var o = { foo : 42};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ var foo;
+
+ if (foo === undefined) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-5.js b/test/suite/ietestcenter/chapter12/12.14/12.14-5.js
new file mode 100644
index 000000000..da1cc3e0b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-5",
+
+path: "TestCases/chapter12/12.14/12.14-5.js",
+
+description: "catch introduces scope - block-local functions must shadow outer functions",
+
+test: function testcase() {
+ var o = {foo: function () { return 42;}};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ function foo() {}
+ if (foo() === undefined) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-6.js b/test/suite/ietestcenter/chapter12/12.14/12.14-6.js
new file mode 100644
index 000000000..92e6dbdc5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-6",
+
+path: "TestCases/chapter12/12.14/12.14-6.js",
+
+description: "catch introduces scope - block-local function expression must shadow outer function expression",
+
+test: function testcase() {
+ var o = {foo : function () { return 42;}};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ var foo = function () {};
+ if (foo() === undefined) {
+ return true;
+ }
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-7.js b/test/suite/ietestcenter/chapter12/12.14/12.14-7.js
new file mode 100644
index 000000000..d8da127c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-7.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-7",
+
+path: "TestCases/chapter12/12.14/12.14-7.js",
+
+description: "catch introduces scope - scope removed when exiting catch block",
+
+test: function testcase() {
+ var o = {foo: 1};
+ var catchAccessed = false;
+
+ try {
+ throw o;
+ }
+ catch (expObj) {
+ catchAccessed = (expObj.foo == 1);
+ }
+
+ try {
+ expObj;
+ }
+ catch (e) {
+ return catchAccessed && e instanceof ReferenceError
+ }
+ return false;
+ },
+ precondition: function prereq() {
+ return true;
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-8.js b/test/suite/ietestcenter/chapter12/12.14/12.14-8.js
new file mode 100644
index 000000000..81ad12fb9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-8.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+local vars must not be visible outside with block
+local functions must not be visible outside with block
+local function expresssions should not be visible outside with block
+local vars must shadow outer vars
+local functions must shadow outer functions
+local function expresssions must shadow outer function expressions
+eval should use the appended object to the scope chain
+*/
+
+
+ES5Harness.registerTest( {
+id: "12.14-8",
+
+path: "TestCases/chapter12/12.14/12.14-8.js",
+
+description: "catch introduces scope - scope removed when exiting catch block (properties)",
+
+test: function testcase() {
+ var o = {foo: 42};
+
+ try {
+ throw o;
+ }
+ catch (e) {
+ var foo = 1;
+ }
+
+ if (o.foo === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.14/12.14-9.js b/test/suite/ietestcenter/chapter12/12.14/12.14-9.js
new file mode 100644
index 000000000..4f0aacc84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.14/12.14-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.14-9",
+
+path: "TestCases/chapter12/12.14/12.14-9.js",
+
+description: "catch introduces scope - name lookup finds outer variable",
+
+test: function testcase() {
+ function f(o) {
+ var x = 42;
+
+ function innerf(o) {
+ try {
+ throw o;
+ }
+ catch (e) {
+ return x;
+ }
+ }
+
+ return innerf(o);
+ }
+
+ if (f({}) === 42) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-11.js b/test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-11.js
new file mode 100644
index 000000000..1e2725fd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-11.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.2.1-11",
+
+path: "TestCases/chapter12/12.2/12.2.1/12.2.1-11.js",
+
+description: "arguments as var identifier in eval code is allowed",
+
+test: function testcase() {
+ eval("var arguments;");
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-12.js b/test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-12.js
new file mode 100644
index 000000000..61456c048
--- /dev/null
+++ b/test/suite/ietestcenter/chapter12/12.2/12.2.1/12.2.1-12.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "12.2.1-12",
+
+path: "TestCases/chapter12/12.2/12.2.1/12.2.1-12.js",
+
+description: "arguments as local var identifier is allowed",
+
+test: function testcase() {
+ eval("(function (){var arguments;})");
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.6/15.10.6.js b/test/suite/ietestcenter/chapter15/15.10/15.10.6/15.10.6.js
new file mode 100644
index 000000000..8c30b422f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.6/15.10.6.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.6",
+
+path: "TestCases/chapter15/15.10/15.10.6/15.10.6.js",
+
+description: "RegExp.prototype is itself a RegExp",
+
+test: function testcase() {
+ var s = Object.prototype.toString.call(RegExp.prototype);
+ if (s === '[object RegExp]') {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js
new file mode 100644
index 000000000..1c06b2c37
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.1-1",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js",
+
+description: "RegExp.prototype.source is of type String",
+
+test: function testcase() {
+ if((typeof(RegExp.prototype.source)) === 'string')
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js
new file mode 100644
index 000000000..65682fc39
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.1-2",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js",
+
+description: "RegExp.prototype.source is a data property with default attribute values (false)",
+
+test: function testcase() {
+ var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source');
+
+ if (d.writable === false &&
+ d.enumerable === false &&
+ d.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js
new file mode 100644
index 000000000..9247d9b5d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.2-1",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js",
+
+description: "RegExp.prototype.global is of type Boolean",
+
+test: function testcase() {
+ if((typeof(RegExp.prototype.global)) === 'boolean')
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js
new file mode 100644
index 000000000..1d1dbf857
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.2-2",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js",
+
+description: "RegExp.prototype.global is a data property with default attribute values (false)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global');
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js
new file mode 100644
index 000000000..c66582e3e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.3-1",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js",
+
+description: "RegExp.prototype.ignoreCase is of type Boolean",
+
+test: function testcase() {
+ if((typeof(RegExp.prototype.ignoreCase)) === 'boolean')
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js
new file mode 100644
index 000000000..aaff82f16
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.3-2",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js",
+
+description: "RegExp.prototype.ignoreCase is a data property with default attribute values (false)",
+
+test: function testcase() {
+ var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase');
+
+ if (d.writable === false &&
+ d.enumerable === false &&
+ d.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js
new file mode 100644
index 000000000..612171f96
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.4-1",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js",
+
+description: "RegExp.prototype.multiline is of type Boolean",
+
+test: function testcase() {
+ if((typeof(RegExp.prototype.multiline)) === 'boolean')
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js
new file mode 100644
index 000000000..21f708938
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.4-2",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js",
+
+description: "RegExp.prototype.multiline is a data property with default attribute values (false)",
+
+test: function testcase() {
+ var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline');
+
+ if (d.writable === false &&
+ d.enumerable === false &&
+ d.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js
new file mode 100644
index 000000000..c2a57e569
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.5-1",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js",
+
+description: "RegExp.prototype.lastIndex is of type Number",
+
+test: function testcase() {
+ if((typeof(RegExp.prototype.lastIndex)) === 'number')
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js
new file mode 100644
index 000000000..7815a9335
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.10.7.5-2",
+
+path: "TestCases/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js",
+
+description: "RegExp.prototype.lastIndex is a data property with specified attribute values",
+
+test: function testcase() {
+ var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'lastIndex');
+
+ if (d.writable === true &&
+ d.enumerable === false &&
+ d.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12-0-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12-0-1.js
new file mode 100644
index 000000000..37a3960f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12-0-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The name JSON must be bound to an object.
+4.2 calls out JSON as one of the built-in objects.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12-0-1",
+
+path: "TestCases/chapter15/15.12/15.12-0-1.js",
+
+description: "JSON must be a built-in object",
+
+test: function testcase() {
+ var o = JSON;
+ if (typeof(o) === "object") {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12-0-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12-0-2.js
new file mode 100644
index 000000000..8cc03e433
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12-0-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The name JSON must be bound to an object, and must not support [[Construct]].
+step 4 in 11.2.2 should throw a TypeError exception.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12-0-2",
+
+path: "TestCases/chapter15/15.12/15.12-0-2.js",
+
+description: "JSON must not support the [[Construct]] method",
+
+test: function testcase() {
+ var o = JSON;
+
+ try {
+ var j = new JSON();
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12-0-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12-0-3.js
new file mode 100644
index 000000000..97a7d6014
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12-0-3.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The name JSON must be bound to an object, and must not support [[Call]].
+step 5 in 11.2.3 should throw a TypeError exception.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12-0-3",
+
+path: "TestCases/chapter15/15.12/15.12-0-3.js",
+
+description: "JSON must not support the [[Call]] method",
+
+test: function testcase() {
+ var o = JSON;
+
+ try {
+ var j = JSON();
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12-0-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12-0-4.js
new file mode 100644
index 000000000..da6ce9e07
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12-0-4.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The last paragraph in section 15 says "every other property described
+in this section has the attribute {... [[Enumerable]] : false ...}
+unless otherwise specified. This default applies to the properties on
+JSON, and we should not be able to enumerate them.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12-0-4",
+
+path: "TestCases/chapter15/15.12/15.12-0-4.js",
+
+description: "JSON object's properties must be non enumerable",
+
+test: function testcase() {
+ var o = JSON;
+ var i = 0;
+ for (var p in o) {
+ i++;
+ }
+
+ if (i === 0) {
+ return true;
+ }
+ } ,
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js
new file mode 100644
index 000000000..86a02c6f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-1",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-1.js",
+
+description: "The JSON lexical grammar treats whitespace as a token seperator",
+
+test: function testcase() {
+
+ try {
+ JSON.parse('12\t\r\n 34'); // should produce a syntax error as whitespace results in two tokens
+ }
+ catch (e) {
+ if (e.name === 'SyntaxError') return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js
new file mode 100644
index 000000000..1689a18a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-2",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-2.js",
+
+description: "<VT> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+
+test: function testcase() {
+
+ try {
+ JSON.parse('\u000b1234'); // should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js
new file mode 100644
index 000000000..2f152c27a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-3",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-3.js",
+
+description: "<FF> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+
+test: function testcase() {
+
+ try {
+ JSON.parse('\u000c1234'); // should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js
new file mode 100644
index 000000000..77c2f5711
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-4",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-4.js",
+
+description: "<NBSP> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+
+test: function testcase() {
+
+ try {
+ JSON.parse('\u00a01234'); // should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js
new file mode 100644
index 000000000..7aa872e83
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-5",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-5.js",
+
+description: "<ZWSPP> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+
+test: function testcase() {
+
+ try {
+ JSON.parse('\u200b1234'); // should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js
new file mode 100644
index 000000000..3f76186e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-6",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-6.js",
+
+description: "<BOM> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+
+test: function testcase() {
+
+ try {
+ JSON.parse('\ufeff1234'); // should produce a syntax error a
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js
new file mode 100644
index 000000000..b97675f45
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-7",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-7.js",
+
+description: "other category z spaces are not valid JSON whitespace as specified by the production JSONWhitespace.",
+
+test: function testcase() {
+
+ try {
+ // the following should produce a syntax error
+ JSON.parse('\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u30001234');
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js
new file mode 100644
index 000000000..5ebf10b65
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-8",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-8.js",
+
+description: "U+2028 and U+2029 are not valid JSON whitespace as specified by the production JSONWhitespace.",
+
+test: function testcase() {
+
+ try {
+ JSON.parse('\u2028\u20291234'); // should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js
new file mode 100644
index 000000000..96757e9ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-0-9",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-0-9.js",
+
+description: "Whitespace characters can appear before/after any JSONtoken",
+
+test: function testcase() {
+
+ JSON.parse('\t\r \n{\t\r \n'+
+ '"property"\t\r \n:\t\r \n{\t\r \n}\t\r \n,\t\r \n' +
+ '"prop2"\t\r \n:\t\r \n'+
+ '[\t\r \ntrue\t\r \n,\t\r \nnull\t\r \n,123.456\t\r \n]'+
+ '\t\r \n}\t\r \n'); // should JOSN parse without error
+ return true;
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js
new file mode 100644
index 000000000..27b029232
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g1-1",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g1-1.js",
+
+description: "The JSON lexical grammar treats <TAB> as a whitespace character",
+
+test: function testcase() {
+ if (JSON.parse('\t1234')!==1234) return false; // <TAB> should be ignored
+ try {
+ JSON.parse('12\t34'); // <TAB> should produce a syntax error as whitespace results in two tokens
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js
new file mode 100644
index 000000000..3b6f3775a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g1-2",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g1-2.js",
+
+description: "The JSON lexical grammar treats <CR> as a whitespace character",
+
+test: function testcase() {
+ if (JSON.parse('\r1234')!==1234) return false; // <cr> should be ignored
+ try {
+ JSON.parse('12\r34'); // <CR> should produce a syntax error as whitespace results in two tokens
+ }
+ catch (e) {
+ if (e.name === 'SyntaxError') return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js
new file mode 100644
index 000000000..15098dac9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g1-3",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g1-3.js",
+
+description: "The JSON lexical grammar treats <LF> as a whitespace character",
+
+test: function testcase() {
+ if (JSON.parse('\n1234')!==1234) return false; // <LF> should be ignored
+ try {
+ JSON.parse('12\n34'); // <LF> should produce a syntax error as whitespace results in two tokens
+ }
+ catch (e) {
+ if (e.name === 'SyntaxError') return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js
new file mode 100644
index 000000000..71259b352
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g1-4",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g1-4.js",
+
+description: "The JSON lexical grammar treats <SP> as a whitespace character",
+
+test: function testcase() {
+ if (JSON.parse(' 1234')!=1234) return false; // <SP> should be ignored
+ try {
+ JSON.parse('12 34'); // <SP> should produce a syntax error as whitespace results in two tokens
+ }
+ catch (e) {
+ if (e.name === 'SyntaxError') return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('1234')===1234;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js
new file mode 100644
index 000000000..85ca8b3b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g2-1",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g2-1.js",
+
+description: "JSONStrings can be written using double quotes",
+
+test: function testcase() {
+ return JSON.parse('"abc"')==="abc";
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) ;
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js
new file mode 100644
index 000000000..3d90176f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js
@@ -0,0 +1,41 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g2-2",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g2-2.js",
+
+description: "A JSONString may not be delimited by single quotes ",
+
+test: function testcase() {
+ try {
+ if (JSON.parse("'abc'") ==='abc') return false;
+ }
+ catch (e) {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js
new file mode 100644
index 000000000..80d2111d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js
@@ -0,0 +1,41 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g2-3",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g2-3.js",
+
+description: "A JSONString may not be delimited by Uncode escaped quotes ",
+
+test: function testcase() {
+ try {
+ if (JSON.parse("\\u0022abc\\u0022") ==='abc') return false;
+ }
+ catch (e) {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js
new file mode 100644
index 000000000..ea82bdb10
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js
@@ -0,0 +1,41 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g2-4",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g2-4.js",
+
+description: "A JSONString must both begin and end with double quotes",
+
+test: function testcase() {
+ try {
+ if (JSON.parse('"ab'+"c'") ==='abc') return false;
+ }
+ catch (e) {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js
new file mode 100644
index 000000000..877ba3ebf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g2-5",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g2-5.js",
+
+description: "A JSONStrings can contain no JSONStringCharacters (Empty JSONStrings)",
+
+test: function testcase() {
+ return JSON.parse('""')==="";
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse) && JSON.parse('"1234"')==='1234';
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js
new file mode 100644
index 000000000..b5ee9280b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g4-1",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g4-1.js",
+
+description: "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0000 thru U+0007",
+
+test: function testcase() {
+ try {
+ JSON.parse('"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007"'); // invalid string characters should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js
new file mode 100644
index 000000000..a3279099a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g4-2",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g4-2.js",
+
+description: "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0008 thru U+000F",
+
+test: function testcase() {
+ try {
+ JSON.parse('"\u0008\u0009\u000a\u000b\u000c\u000d\u000e\u000f"'); // invalid string characters should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js
new file mode 100644
index 000000000..181d5623e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g4-3",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g4-3.js",
+
+description: "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0010 thru U+0017",
+
+test: function testcase() {
+ try {
+ JSON.parse('"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017"'); // invalid string characters should produce a syntax error
+ }
+ catch (e) {
+ return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js
new file mode 100644
index 000000000..aa7a67d23
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g4-4",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g4-4.js",
+
+description: "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0018 thru U+001F",
+
+test: function testcase() {
+ try {
+ JSON.parse('"\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f"'); // invalid string characters should produce a syntax error
+ }
+ catch (e) {
+ if (e.name === 'SyntaxError') return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js
new file mode 100644
index 000000000..f175bc24f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js
@@ -0,0 +1,36 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g5-1",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g5-1.js",
+
+description: "The JSON lexical grammar allows Unicode escape sequences in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\u0058"')==='X';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& '\u0058'==='X' && JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js
new file mode 100644
index 000000000..8bb27a362
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js
@@ -0,0 +1,41 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g5-2",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g5-2.js",
+
+description: "A JSONStringCharacter UnicodeEscape may not have fewer than 4 hex characters",
+
+test: function testcase() {
+ try {
+ JSON.parse('"\\u005"')
+ }
+ catch (e) {
+ return e.name==='SyntaxError'
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& '\u0058'==='X' && JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js
new file mode 100644
index 000000000..0087e2d28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js
@@ -0,0 +1,41 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g5-3",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g5-3.js",
+
+description: "A JSONStringCharacter UnicodeEscape may not include any non=hex characters",
+
+test: function testcase() {
+ try {
+ JSON.parse('"\\u0X50"')
+ }
+ catch (e) {
+ return e.name==='SyntaxError'
+ }
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& '\u0058'==='X' && JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js
new file mode 100644
index 000000000..5ff49b40e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g6-1",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g6-1.js",
+
+description: "The JSON lexical grammer allows '/' as a JSONEscapeCharacter after '\' in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\/"')==='/';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js
new file mode 100644
index 000000000..78e9c2696
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g6-2",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g6-2.js",
+
+description: "The JSON lexical grammer allows '\' as a JSONEscapeCharacter after '\' in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\\\"')==='\\';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js
new file mode 100644
index 000000000..fd038d1c4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g6-3",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g6-3.js",
+
+description: "The JSON lexical grammer allows 'b' as a JSONEscapeCharacter after '\' in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\b"')==='\b';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js
new file mode 100644
index 000000000..6be18c47b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g6-4",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g6-4.js",
+
+description: "The JSON lexical grammer allows 'f' as a JSONEscapeCharacter after '\' in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\f"')==='\f';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js
new file mode 100644
index 000000000..55366b5ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g6-5",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g6-5.js",
+
+description: "The JSON lexical grammer allows 'n' as a JSONEscapeCharacter after '\' in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\n"')==='\n';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js
new file mode 100644
index 000000000..e4e1982cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g6-6",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g6-6.js",
+
+description: "The JSON lexical grammer allows 'r' as a JSONEscapeCharacter after '\' in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\r"')==='\r';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js
new file mode 100644
index 000000000..431d4dd0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.1.1-g6-7",
+
+path: "TestCases/chapter15/15.12/15.12.1/25.12.1.1/15.12.1.1-g6-7.js",
+
+description: "The JSON lexical grammer allows 't' as a JSONEscapeCharacter after '\' in a JSONString",
+
+test: function testcase() {
+ return JSON.parse('"\\t"')==='\t';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.parse)&& JSON.parse('"1234"')==="1234";
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-1.js
new file mode 100644
index 000000000..7e9596032
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The name JSON must be bound to an object.
+
+Section 15 says that every built-in Function object described in this
+section — whether as a constructor, an ordinary function, or both — has
+a length property whose value is an integer. Unless otherwise specified,
+this value is equal to the largest number of named arguments shown in
+the section headings for the function description, including optional
+parameters.
+
+This default applies to JSON.parse, and it must exist as a function
+taking 2 parameters.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12.2-0-1",
+
+path: "TestCases/chapter15/15.12/15.12.2/15.12.2-0-1.js",
+
+description: "JSON.parse must exist as a function",
+
+test: function testcase() {
+ var f = JSON.parse;
+
+ if (typeof(f) === "function") {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-2.js
new file mode 100644
index 000000000..e7f9aa527
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-2.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The name JSON must be bound to an object.
+
+Section 15 says that every built-in Function object described in this
+section — whether as a constructor, an ordinary function, or both — has
+a length property whose value is an integer. Unless otherwise specified,
+this value is equal to the largest number of named arguments shown in
+the section headings for the function description, including optional
+parameters.
+
+This default applies to JSON.parse, and it must exist as a function
+taking 2 parameters.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12.2-0-2",
+
+path: "TestCases/chapter15/15.12/15.12.2/15.12.2-0-2.js",
+
+description: "JSON.parse must exist as a function taking 2 parameters",
+
+test: function testcase() {
+ var f = JSON.parse;
+
+ if (typeof(f) === "function" && f.length === 2) {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-3.js
new file mode 100644
index 000000000..98caca9f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.2/15.12.2-0-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The initial value of [[Configurable]] on JSON is true. This means we
+should be able to delete (8.6.2.5) the stringify and parse properties.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12.2-0-3",
+
+path: "TestCases/chapter15/15.12/15.12.2/15.12.2-0-3.js",
+
+description: "JSON.parse must be deletable (configurable)",
+
+test: function testcase() {
+ var o = JSON;
+ var desc = Object.getOwnPropertyDescriptor(o, "parse");
+ return desc.configurable === true;
+ },
+
+ precondition: function preq () {
+ return typeof JSON != "undefined" && fnExists(Object.getOwnPropertyDescriptor)
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-1.js
new file mode 100644
index 000000000..c21cc8b47
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The name JSON must be bound to an object.
+
+Section 15 says that every built-in Function object described in this
+section — whether as a constructor, an ordinary function, or both — has
+a length property whose value is an integer. Unless otherwise specified,
+this value is equal to the largest number of named arguments shown in
+the section headings for the function description, including optional
+parameters.
+
+This default applies to JSON.stringify, and it must exist as a function
+taking 3 parameters.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-0-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-0-1.js",
+
+description: "JSON.stringify must exist as be a function",
+
+test: function testcase() {
+ var f = JSON.stringify;
+
+ if (typeof(f) === "function") {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-2.js
new file mode 100644
index 000000000..0915aa4cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-2.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The name JSON must be bound to an object.
+
+Section 15 says that every built-in Function object described in this
+section — whether as a constructor, an ordinary function, or both — has
+a length property whose value is an integer. Unless otherwise specified,
+this value is equal to the largest number of named arguments shown in
+the section headings for the function description, including optional
+parameters.
+
+This default applies to JSON.stringify, and it must exist as a function
+taking 3 parameters.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-0-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-0-2.js",
+
+description: "JSON.stringify must exist as be a function taking 3 parameters",
+
+test: function testcase() {
+ var f = JSON.stringify;
+
+ if (typeof(f) === "function" && f.length === 3) {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return JSON !== undefined;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-3.js
new file mode 100644
index 000000000..8d6549691
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-0-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+This test should be run without any built-ins being added/augmented.
+The initial value of [[Configurable]] on JSON is true. This means we
+should be able to delete (8.6.2.5) the stringify and parse properties.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-0-3",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-0-3.js",
+
+description: "JSON.stringify must be deletable (configurable)",
+
+test: function testcase() {
+ var o = JSON;
+ var desc = Object.getOwnPropertyDescriptor(o, "stringify");
+ if (desc.configurable === true) {
+ return true;
+ }
+ },
+
+ precondition: function preq () {
+ return typeof JSON != "undefined" && fnExists(Object.getOwnPropertyDescriptor)
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-1.js
new file mode 100644
index 000000000..96da2c66c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-1.js",
+
+description: "JSON.stringify(undefined) returns undefined",
+
+test: function testcase() {
+ return JSON.stringify(undefined) === undefined;
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-10.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-10.js
new file mode 100644
index 000000000..ed5a889f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-10.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-10",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-10.js",
+
+description: "A JSON.stringify replacer function applied to a top level scalar value can return undefined.",
+
+test: function testcase() {
+ return JSON.stringify(42, function(k, v) { return undefined }) === undefined;
+ },
+
+precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-11.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-11.js
new file mode 100644
index 000000000..a44253f1b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-11.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-11",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-11.js",
+
+description: "A JSON.stringify replacer function applied to a top level Object can return undefined.",
+
+test: function testcase() {
+ return JSON.stringify({prop:1}, function(k, v) { return undefined }) === undefined;
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-12.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-12.js
new file mode 100644
index 000000000..d13a14854
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-12.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-12",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-12.js",
+
+description: "A JSON.stringify replacer function applied to a top level scalar can return an Array.",
+
+test: function testcase() {
+ return JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }) === '[4,2]';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-13.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-13.js
new file mode 100644
index 000000000..a493c4ee3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-13.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-13",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-13.js",
+
+description: "A JSON.stringify replacer function applied to a top level scalar can return an Object.",
+
+test: function testcase() {
+ return JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}) === '{"forty":2}';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-14.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-14.js
new file mode 100644
index 000000000..36ddac1fb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-14.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-14",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-14.js",
+
+description: "Applying JSON.stringify to a function returns undefined.",
+
+test: function testcase() {
+ return JSON.stringify(function() {}) === undefined;
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-15.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-15.js
new file mode 100644
index 000000000..110fbb6ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-15.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-15",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-15.js",
+
+description: "Applying JSON.stringify with a replacer function to a function returns the replacer value.",
+
+test: function testcase() {
+ return JSON.stringify(function() {}, function(k,v) {return 99}) === '99';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-2.js
new file mode 100644
index 000000000..ff41a7da6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-2.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-2.js",
+
+description: "A JSON.stringify replacer function works is applied to a top level undefined value.",
+
+test: function testcase() {
+ return JSON.stringify(undefined, function(k, v) { return "replacement" }) === '"replacement"';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-3.js
new file mode 100644
index 000000000..8d6a55f85
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-3.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-3",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-3.js",
+
+description: "A JSON.stringify correctly works on top level string values.",
+
+test: function testcase() {
+ return JSON.stringify("a string") === '"a string"';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-4.js
new file mode 100644
index 000000000..b20b27d41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-4.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-4",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-4.js",
+
+description: "JSON.stringify correctly works on top level Number values.",
+
+test: function testcase() {
+ return JSON.stringify(123) === '123';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-5.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-5.js
new file mode 100644
index 000000000..aedd2514e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-5.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-5",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-5.js",
+
+description: "JSON.stringify correctly works on top level Boolean values.",
+
+test: function testcase() {
+ return JSON.stringify(true) === 'true';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-6.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-6.js
new file mode 100644
index 000000000..b9f664e5c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-6.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-6",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-6.js",
+
+description: "JSON.stringify correctly works on top level null values.",
+
+test: function testcase() {
+ return JSON.stringify(null) === 'null';
+ },
+
+ precodition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-7.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-7.js
new file mode 100644
index 000000000..3122ce363
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-7.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-7",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-7.js",
+
+description: "JSON.stringify correctly works on top level Number objects.",
+
+test: function testcase() {
+ return JSON.stringify(new Number(42)) === '42';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-8.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-8.js
new file mode 100644
index 000000000..6959cd440
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-8.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-8",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-8.js",
+
+description: "JSON.stringify correctly works on top level String objects.",
+
+test: function testcase() {
+ return JSON.stringify(new String('wrappered')) === '"wrappered"';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-9.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-9.js
new file mode 100644
index 000000000..331e25d49
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-11-9.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-11-9",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-11-9.js",
+
+description: "JSON.stringify correctly works on top level Boolean objects.",
+
+test: function testcase() {
+ return JSON.stringify(new Boolean(false)) === 'false';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-4-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-4-1.js
new file mode 100644
index 000000000..3ca39f05c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-4-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-4-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-4-1.js",
+
+description: "JSON.stringify ignores replacer aruguments that are not functions or arrays..",
+
+test: function testcase() {
+ try {
+ return JSON.stringify([42],{})=== '[42]';
+ }
+ catch (e) {return false}
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-a-i-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-a-i-1.js
new file mode 100644
index 000000000..df0f0b2e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-a-i-1.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-5-a-i-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-5-a-i-1.js",
+
+description: "JSON.stringify converts Number wrapper object space aruguments to Number values",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, new Number(5))=== JSON.stringify(obj,null, 5);
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-b-i-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-b-i-1.js
new file mode 100644
index 000000000..a5ddd965f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-5-b-i-1.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-5-b-i-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-5-b-i-1.js",
+
+description: "JSON.stringify converts String wrapper object space aruguments to String values",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, new String('xxx'))=== JSON.stringify(obj,null, 'xxx');
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-1.js
new file mode 100644
index 000000000..21f0feed0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-1.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-6-a-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-6-a-1.js",
+
+description: "JSON.stringify treats numeric space arguments greater than 10 the same as a space argument of 10.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, 10)=== JSON.stringify(obj,null, 100);
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-2.js
new file mode 100644
index 000000000..774117cb0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-a-2.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-6-a-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-6-a-2.js",
+
+description: "JSON.stringify truccates non-integer numeric space arguments to their integer part.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, 5.99999)=== JSON.stringify(obj,null, 5);
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-1.js
new file mode 100644
index 000000000..ae1cdb112
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-1.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-6-b-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-1.js",
+
+description: "JSON.stringify treats numeric space arguments less than 1 (0.999999)the same as emptry string space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, 0.999999)=== JSON.stringify(obj); /* emptry string should be same as no space arg */
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-2.js
new file mode 100644
index 000000000..ace11de6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-2.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-6-b-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-2.js",
+
+description: "JSON.stringify treats numeric space arguments less than 1 (0)the same as emptry string space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, 0)=== JSON.stringify(obj); /* emptry string should be same as no space arg */
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-3.js
new file mode 100644
index 000000000..3d439a1fb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-3.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-6-b-3",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-3.js",
+
+description: "JSON.stringify treats numeric space arguments less than 1 (-5) the same as emptry string space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, -5)=== JSON.stringify(obj); /* emptry string should be same as no space arg */
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-4.js
new file mode 100644
index 000000000..8e7940c4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-6-b-4.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-6-b-4",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-4.js",
+
+description: "JSON.stringify treats numeric space arguments (in the range 1..10) is equivalent to a string of spaces of that length.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ var fiveSpaces = ' ';
+ // '12345'
+ return JSON.stringify(obj,null, 5)=== JSON.stringify(obj, null, fiveSpaces);
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-7-a-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-7-a-1.js
new file mode 100644
index 000000000..4980617f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-7-a-1.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-7-a-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-7-a-1.js",
+
+description: "JSON.stringify only uses the first 10 characters of a string space arguments.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj,null, '0123456789xxxxxxxxx')=== JSON.stringify(obj,null, '0123456789');
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-1.js
new file mode 100644
index 000000000..9c6c9d87a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-1.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-8-a-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-1.js",
+
+description: "JSON.stringify treats an empty string space argument the same as a missing space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj)=== JSON.stringify(obj,null, '');
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-2.js
new file mode 100644
index 000000000..6a59d89eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-2.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-8-a-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-2.js",
+
+description: "JSON.stringify treats an Boolean space argument the same as a missing space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj)=== JSON.stringify(obj,null, true);
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-3.js
new file mode 100644
index 000000000..c96bcf595
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-3.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-8-a-3",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-3.js",
+
+description: "JSON.stringify treats an null space argument the same as a missing space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj)=== JSON.stringify(obj,null, null);
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-4.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-4.js
new file mode 100644
index 000000000..41b04a5ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-4.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-8-a-4",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-4.js",
+
+description: "JSON.stringify treats an Boolean wrapper space argument the same as a missing space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj)=== JSON.stringify(obj,null, new Boolean(true));
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-5.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-5.js
new file mode 100644
index 000000000..5a5fb1b7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3-8-a-5.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3-8-a-5",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-5.js",
+
+description: "JSON.stringify treats non-Number or String object space arguments the same as a missing space argument.",
+
+test: function testcase() {
+ var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};
+ return JSON.stringify(obj)=== JSON.stringify(obj,null, obj);
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-1.js
new file mode 100644
index 000000000..1e5b87316
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_2-2-b-i-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-1.js",
+
+description: "JSON.stringify converts string wrapper objects returned from a toJSON call to literal strings.",
+
+test: function testcase() {
+ var obj = {
+ prop:42,
+ toJSON: function () {return 'fortytwo objects'}
+ };
+ return JSON.stringify([obj]) === '["fortytwo objects"]';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-2.js
new file mode 100644
index 000000000..cc6d3b84f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_2-2-b-i-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-2.js",
+
+description: "JSON.stringify converts Number wrapper objects returned from a toJSON call to literal Number.",
+
+test: function testcase() {
+ var obj = {
+ prop:42,
+ toJSON: function () {return new Number(42)}
+ };
+ return JSON.stringify([obj]) === '[42]';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-3.js
new file mode 100644
index 000000000..2601e7b7c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_2-2-b-i-3",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-3.js",
+
+description: "JSON.stringify converts Boolean wrapper objects returned from a toJSON call to literal Boolean values.",
+
+test: function testcase() {
+ var obj = {
+ prop:42,
+ toJSON: function () {return new Boolean(true)}
+ };
+ return JSON.stringify([obj]) === '[true]';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-1.js
new file mode 100644
index 000000000..4c8cb4e1a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_2-3-a-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_2-3-a-1.js",
+
+description: "JSON.stringify converts string wrapper objects returned from replacer functions to literal strings.",
+
+test: function testcase() {
+ return JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}) === '["fortytwo"]';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-2.js
new file mode 100644
index 000000000..81c39d535
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-2.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_2-3-a-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_2-3-a-2.js",
+
+description: "JSON.stringify converts Number wrapper objects returned from replacer functions to literal numbers.",
+
+test: function testcase() {
+ return JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}) === '[84]';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-3.js
new file mode 100644
index 000000000..9a8a4456e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_2-3-a-3.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_2-3-a-3",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_2-3-a-3.js",
+
+description: "JSON.stringify converts Boolean wrapper objects returned from replacer functions to literal numbers.",
+
+test: function testcase() {
+ return JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}) === '[false]';
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-1.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-1.js
new file mode 100644
index 000000000..bc45ed276
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_4-1-1",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_4-1-1.js",
+
+description: "JSON.stringify a circular object throws a error",
+
+test: function testcase() {
+ var obj = {};
+ obj.prop = obj;
+ try {
+ JSON.stringify(obj);
+ return false; // should not reach here
+ }
+ catch (e) {return true}
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-2.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-2.js
new file mode 100644
index 000000000..c9cd06314
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_4-1-2",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_4-1-2.js",
+
+description: "JSON.stringify a circular object throws a TypeError",
+
+test: function testcase() {
+ var obj = {};
+ obj.prop = obj;
+ try {
+ JSON.stringify(obj);
+ return false; // should not reach here
+ }
+ catch (e) {return e.name==='TypeError'}
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-3.js b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-3.js
new file mode 100644
index 000000000..6fb219738
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.12/15.12.3/15.12.3_4-1-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.12.3_4-1-3",
+
+path: "TestCases/chapter15/15.12/15.12.3/15.12.3_4-1-3.js",
+
+description: "JSON.stringify a indirectly circular object throws a error",
+
+test: function testcase() {
+ var obj = {p1: {p2: {}}};
+ obj.p1.p2.prop = obj;
+ try {
+ JSON.stringify(obj);
+ return false; // should not reach here
+ }
+ catch (e) {return true}
+ },
+
+ precondition: function preq () {
+ return JSON && fnExists(JSON.stringify);
+ }
+} );
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.1/15.2.3.1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.1/15.2.3.1.js
new file mode 100644
index 000000000..f67f09317
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.1/15.2.3.1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.1/15.2.3.1.js",
+
+description: "Object.prototype is a data property with default attribute values (false)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, 'prototype');
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js
new file mode 100644
index 000000000..0969cf4be
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.10-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js",
+
+description: "Object.preventExtensions must exist as a function",
+
+test: function testcase() {
+ var f = Object.preventExtensions;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js
new file mode 100644
index 000000000..e6f1a9122
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.10-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js",
+
+description: "Object.preventExtensions must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.preventExtensions.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.preventExtensions);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js
new file mode 100644
index 000000000..df8000f9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.10-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js",
+
+description: "Object.preventExtensions throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.preventExtensions(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.preventExtensions);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js
new file mode 100644
index 000000000..18585ed4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The effect of preventExtentions must be testable by calling isExtensible
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.10-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js",
+
+description: "Object.preventExtensions returns its arguments after setting its extensible property to false",
+
+test: function testcase() {
+ var o = {};
+ var o2 = undefined;
+
+ o2 = Object.preventExtensions(o);
+ if (o2 === o && Object.isExtensible(o2) === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.preventExtensions);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js
new file mode 100644
index 000000000..6606c1aee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js",
+
+description: "Object.isSealed must exist as a function",
+
+test: function testcase() {
+ var f = Object.isSealed;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js
new file mode 100644
index 000000000..adeb4fa97
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js",
+
+description: "Object.isSealed must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.isSealed.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js
new file mode 100644
index 000000000..a370fc17f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js",
+
+description: "Object.isSealed throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.isSealed(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js
new file mode 100644
index 000000000..40d6e1fbd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js",
+
+description: "Object.isSealed returns false for all built-in objects (Global)",
+
+test: function testcase() {
+ // in non-strict mode, 'this' is bound to the global object.
+ var b = Object.isSealed(this);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js
new file mode 100644
index 000000000..1c6a165ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-10",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js",
+
+description: "Object.isSealed returns false for all built-in objects (Boolean)",
+
+test: function testcase() {
+ var b = Object.isSealed(Boolean);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js
new file mode 100644
index 000000000..59d7d1c18
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-11",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js",
+
+description: "Object.isSealed returns false for all built-in objects (Boolean.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(Boolean.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js
new file mode 100644
index 000000000..f4db29697
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-12",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js",
+
+description: "Object.isSealed returns false for all built-in objects (Number)",
+
+test: function testcase() {
+ var b = Object.isSealed(Number);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js
new file mode 100644
index 000000000..7a020d233
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-13",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js",
+
+description: "Object.isSealed returns false for all built-in objects (Number.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(Number.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js
new file mode 100644
index 000000000..63edd712a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-14",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js",
+
+description: "Object.isSealed returns false for all built-in objects (Math)",
+
+test: function testcase() {
+ var b = Object.isSealed(Math);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js
new file mode 100644
index 000000000..9a25a276b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-15",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js",
+
+description: "Object.isSealed returns false for all built-in objects (Date)",
+
+test: function testcase() {
+ var b = Object.isSealed(Date);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js
new file mode 100644
index 000000000..76a5859ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-16",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js",
+
+description: "Object.isSealed returns false for all built-in objects (Date.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(Date.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js
new file mode 100644
index 000000000..e417beb68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-17",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js",
+
+description: "Object.isSealed returns false for all built-in objects (RegExp)",
+
+test: function testcase() {
+ var b = Object.isSealed(RegExp);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js
new file mode 100644
index 000000000..9916a24c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-18",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js",
+
+description: "Object.isSealed returns false for all built-in objects (RegExp.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(RegExp.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js
new file mode 100644
index 000000000..1b2b69309
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-19",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js",
+
+description: "Object.isSealed returns false for all built-in objects (Error)",
+
+test: function testcase() {
+ var b = Object.isSealed(Error);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js
new file mode 100644
index 000000000..db279bd90
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js",
+
+description: "Object.isSealed returns false for all built-in objects (Object)",
+
+test: function testcase() {
+ var b = Object.isSealed(Object);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js
new file mode 100644
index 000000000..bdf7871f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-20",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js",
+
+description: "Object.isSealed returns false for all built-in objects (Error.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(Error.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js
new file mode 100644
index 000000000..b5d83460b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-21",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js",
+
+description: "Object.isSealed returns false for all built-in objects (EvalError)",
+
+test: function testcase() {
+ var b = Object.isSealed(EvalError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js
new file mode 100644
index 000000000..cc4948e4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-22",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js",
+
+description: "Object.isSealed returns false for all built-in objects (RangeError)",
+
+test: function testcase() {
+ var b = Object.isSealed(RangeError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js
new file mode 100644
index 000000000..3ef58328d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-23",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js",
+
+description: "Object.isSealed returns false for all built-in objects (ReferenceError)",
+
+test: function testcase() {
+ var b = Object.isSealed(ReferenceError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js
new file mode 100644
index 000000000..13709ea0e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-24",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js",
+
+description: "Object.isSealed returns false for all built-in objects (SyntaxError)",
+
+test: function testcase() {
+ var b = Object.isSealed(SyntaxError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js
new file mode 100644
index 000000000..de47afab0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-25",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js",
+
+description: "Object.isSealed returns false for all built-in objects (TypeError)",
+
+test: function testcase() {
+ var b = Object.isSealed(TypeError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js
new file mode 100644
index 000000000..ea165ff65
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-26",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js",
+
+description: "Object.isSealed returns false for all built-in objects (URIError)",
+
+test: function testcase() {
+ var b = Object.isSealed(URIError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js
new file mode 100644
index 000000000..bf445dc68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-27",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js",
+
+description: "Object.isSealed returns false for all built-in objects (JSON)",
+
+test: function testcase() {
+ var b = Object.isSealed(JSON);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js
new file mode 100644
index 000000000..5b938d3bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js",
+
+description: "Object.isSealed returns false for all built-in objects (Object.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(Object.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js
new file mode 100644
index 000000000..c3f5c189d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js",
+
+description: "Object.isSealed returns false for all built-in objects (Function)",
+
+test: function testcase() {
+ var b = Object.isSealed(Function);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js
new file mode 100644
index 000000000..e568157f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js",
+
+description: "Object.isSealed returns false for all built-in objects (Function.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(Function.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js
new file mode 100644
index 000000000..f5ec261f1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js",
+
+description: "Object.isSealed returns false for all built-in objects (Array)",
+
+test: function testcase() {
+ var b = Object.isSealed(Array);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js
new file mode 100644
index 000000000..f1bf7f51d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-7",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js",
+
+description: "Object.isSealed returns false for all built-in objects (Array.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(Array.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js
new file mode 100644
index 000000000..c097aba4e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-8",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js",
+
+description: "Object.isSealed returns false for all built-in objects (String)",
+
+test: function testcase() {
+ var b = Object.isSealed(String);
+ if (b === false) {
+ return true;
+ }
+},
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js
new file mode 100644
index 000000000..f253ddb4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.11-4-9",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js",
+
+description: "Object.isSealed returns false for all built-in objects (String.prototype)",
+
+test: function testcase() {
+ var b = Object.isSealed(String.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js
new file mode 100644
index 000000000..6d80d6e84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js",
+
+description: "Object.isFrozen must exist as a function",
+
+test: function testcase() {
+ var f = Object.isFrozen;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js
new file mode 100644
index 000000000..369a15331
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js",
+
+description: "Object.isFrozen must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.isFrozen.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js
new file mode 100644
index 000000000..405247898
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js",
+
+description: "Object.isFrozen throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.isFrozen(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js
new file mode 100644
index 000000000..8c717c011
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Global)",
+
+test: function testcase() {
+ // in non-strict mode, 'this' is bound to the global object.
+ var b = Object.isFrozen(this);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js
new file mode 100644
index 000000000..387d34ab2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-10",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Boolean)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Boolean);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js
new file mode 100644
index 000000000..8e1ec0049
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-11",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Boolean.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Boolean.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js
new file mode 100644
index 000000000..96bf60728
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-12",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Number)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Number);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js
new file mode 100644
index 000000000..453e18143
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-13",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Number.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Number.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js
new file mode 100644
index 000000000..c0d0a0f7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-14",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Math)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Math);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js
new file mode 100644
index 000000000..e15c28320
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-15",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Date)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Date);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js
new file mode 100644
index 000000000..9abf3dc41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-16",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Date.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Date.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js
new file mode 100644
index 000000000..438b6f7c7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-17",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js",
+
+description: "Object.isFrozen returns false for all built-in objects (RegExp)",
+
+test: function testcase() {
+ var b = Object.isFrozen(RegExp);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js
new file mode 100644
index 000000000..0f87c46cf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-18",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js",
+
+description: "Object.isFrozen returns false for all built-in objects (RegExp.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(RegExp.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js
new file mode 100644
index 000000000..7e8897273
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-19",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Error)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Error);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js
new file mode 100644
index 000000000..3094117cc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Object)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Object);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js
new file mode 100644
index 000000000..a479d8ac4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-20",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Error.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Error.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js
new file mode 100644
index 000000000..30b77c538
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-21",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js",
+
+description: "Object.isFrozen returns false for all built-in objects (EvalError)",
+
+test: function testcase() {
+ var b = Object.isFrozen(EvalError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js
new file mode 100644
index 000000000..f2a2d444f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-22",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js",
+
+description: "Object.isFrozen returns false for all built-in objects (RangeError)",
+
+test: function testcase() {
+ var b = Object.isFrozen(RangeError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js
new file mode 100644
index 000000000..308c8a6b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-23",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js",
+
+description: "Object.isFrozen returns false for all built-in objects (ReferenceError)",
+
+test: function testcase() {
+ var b = Object.isFrozen(ReferenceError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js
new file mode 100644
index 000000000..69aa7c471
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-24",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js",
+
+description: "Object.isFrozen returns false for all built-in objects (SyntaxError)",
+
+test: function testcase() {
+ var b = Object.isFrozen(SyntaxError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js
new file mode 100644
index 000000000..028a605c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-25",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js",
+
+description: "Object.isFrozen returns false for all built-in objects (TypeError)",
+
+test: function testcase() {
+ var b = Object.isFrozen(TypeError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js
new file mode 100644
index 000000000..18be21682
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-26",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js",
+
+description: "Object.isFrozen returns false for all built-in objects (URIError)",
+
+test: function testcase() {
+ var b = Object.isFrozen(URIError);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js
new file mode 100644
index 000000000..22f06a213
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-27",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js",
+
+description: "Object.isFrozen returns false for all built-in objects (JSON)",
+
+test: function testcase() {
+ var b = Object.isFrozen(JSON);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js
new file mode 100644
index 000000000..bb479637f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Object.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Object.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js
new file mode 100644
index 000000000..7bf28cd47
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Function)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Function);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js
new file mode 100644
index 000000000..c4e707534
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Function.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Function.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js
new file mode 100644
index 000000000..d3e41b527
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Array)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Array);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js
new file mode 100644
index 000000000..11fc21ab7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-7",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js",
+
+description: "Object.isFrozen returns false for all built-in objects (Array.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(Array.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js
new file mode 100644
index 000000000..97405f811
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-8",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js",
+
+description: "Object.isFrozen returns false for all built-in objects (String)",
+
+test: function testcase() {
+ var b = Object.isFrozen(String);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js
new file mode 100644
index 000000000..69e7d5eab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.12-3-9",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js",
+
+description: "Object.isFrozen returns false for all built-in objects (String.prototype)",
+
+test: function testcase() {
+ var b = Object.isFrozen(String.prototype);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isFrozen);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js
new file mode 100644
index 000000000..b097ec655
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js",
+
+description: "Object.isExtensible must exist as a function",
+
+test: function testcase() {
+ var f = Object.isExtensible ;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js
new file mode 100644
index 000000000..c9cf04e0f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js",
+
+description: "Object.isExtensible must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.isExtensible.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js
new file mode 100644
index 000000000..cffeb7ab5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+A newly created object using the Object contructor has its [[Extensible]]
+property set to true by default (15.2.2.1, step 8).
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-0-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js",
+
+description: "Object.isExtensible is true for objects created using the Object constructor",
+
+test: function testcase() {
+ var o = new Object();
+
+ if (Object.isExtensible(o) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js
new file mode 100644
index 000000000..7a69c93ec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js",
+
+description: "Object.isExtensible throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.isExtensible(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js
new file mode 100644
index 000000000..1de188d5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+global = this;
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Global)",
+
+test: function testcase() {
+ // in non-strict mode, 'this' is bound to the global object.
+ var e = Object.isExtensible(this);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js
new file mode 100644
index 000000000..ab19561cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-10",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js",
+
+description: "Object.isExtensible returns true for all built-in objects (RegExp)",
+
+test: function testcase() {
+ var e = Object.isExtensible(RegExp);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js
new file mode 100644
index 000000000..c6f2dd642
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-11",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Error)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Error);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js
new file mode 100644
index 000000000..6f1f8a9a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-12",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js",
+
+description: "Object.isExtensible returns true for all built-in objects (JSON)",
+
+test: function testcase() {
+ var e = Object.isExtensible(JSON);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js
new file mode 100644
index 000000000..383ec74e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-13",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Function.constructor)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Function.constructor);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js
new file mode 100644
index 000000000..eec360949
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-14",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Function.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Function.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js
new file mode 100644
index 000000000..3c931ead5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-15",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Array.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Array.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js
new file mode 100644
index 000000000..3bc35ac89
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-16",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js",
+
+description: "Object.isExtensible returns true for all built-in objects (String.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(String.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js
new file mode 100644
index 000000000..c9688a8ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-17",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Boolean.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Boolean.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js
new file mode 100644
index 000000000..212b88ef0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-18",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Number.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Number.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js
new file mode 100644
index 000000000..7bd4974e4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-19",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Date.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Date.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js
new file mode 100644
index 000000000..0f937c474
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Object)",
+
+test: function testcase() {
+ var o = {};
+ var e = Object.isExtensible(o);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js
new file mode 100644
index 000000000..07f2466ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-20",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js",
+
+description: "Object.isExtensible returns true for all built-in objects (RegExp.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(RegExp.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js
new file mode 100644
index 000000000..337431117
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Function.constructor
+Function.prototype
+Array.prototype
+String.prototype
+Boolean.prototype
+Number.prototype
+Date.prototype
+RegExp.prototype
+Error.prototype
+*/
+
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-21",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Error.prototype)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Error.prototype);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js
new file mode 100644
index 000000000..d96348fae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Function)",
+
+test: function testcase() {
+ function foo() {}
+
+ var e = Object.isExtensible(foo);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js
new file mode 100644
index 000000000..5260b6a45
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Array)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Array);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js
new file mode 100644
index 000000000..f6691d8d2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js",
+
+description: "Object.isExtensible returns true for all built-in objects (String)",
+
+test: function testcase() {
+ var e = Object.isExtensible(String);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js
new file mode 100644
index 000000000..6205b3205
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Boolean)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Boolean);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js
new file mode 100644
index 000000000..34fe0c412
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-7",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Number)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Number);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js
new file mode 100644
index 000000000..1ebb9aa29
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-8",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Math)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Math);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js
new file mode 100644
index 000000000..04a16800e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.13-2-9",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js",
+
+description: "Object.isExtensible returns true for all built-in objects (Date)",
+
+test: function testcase() {
+ var e = Object.isExtensible(Date);
+ if (e === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js
new file mode 100644
index 000000000..55b98c35a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js",
+
+description: "Object.keys must exist as a function",
+
+test: function testcase() {
+ var f = Object.keys;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js
new file mode 100644
index 000000000..9f0ffb317
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js",
+
+description: "Object.keys must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.keys.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js
new file mode 100644
index 000000000..f2ce6fea0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-1-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js",
+
+description: "Object.keys throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.keys(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js
new file mode 100644
index 000000000..27b273730
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-1-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js",
+
+description: "Object.keys throws TypeError if type of first param is not Object (boolean)",
+
+test: function testcase() {
+ try {
+ Object.keys(true);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js
new file mode 100644
index 000000000..64c41f6b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-1-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js",
+
+description: "Object.keys throws TypeError if type of first param is not Object (string)",
+
+test: function testcase() {
+ try {
+ Object.keys('abc');
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js
new file mode 100644
index 000000000..8a4ac3640
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-1-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js",
+
+description: "Object.keys throws TypeError if type of first param is not Object (null)",
+
+test: function testcase() {
+ try {
+ Object.keys(null);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js
new file mode 100644
index 000000000..12f662399
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-1-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js",
+
+description: "Object.keys throws TypeError if type of first param is not Object (undefined)",
+
+test: function testcase() {
+ try {
+ Object.keys(undefined);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js
new file mode 100644
index 000000000..b6aad9f54
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-2-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js",
+
+description: "Object.keys returns the standard built-in Array",
+
+test: function testcase() {
+ var o = { x: 1, y: 2};
+
+ var a = Object.keys(o);
+ if (Array.isArray(a) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys) && fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js
new file mode 100644
index 000000000..f0c1898c1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-2-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js",
+
+description: "Object.keys returns the standard built-in Array (check [[Class]]",
+
+test: function testcase() {
+ var o = { x: 1, y: 2};
+
+ var a = Object.keys(o);
+ var s = Object.prototype.toString.call(a);
+ if (s === '[object Array]') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js
new file mode 100644
index 000000000..7695ecf58
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-2-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js",
+
+description: "Object.keys returns the standard built-in Array (Array overridden)",
+
+test: function testcase() {
+ function Array() { alert("helloe"); }
+
+ var o = { x: 1, y: 2};
+
+ var a = Object.keys(o);
+
+ var s = Object.prototype.toString.call(a);
+ if (s === '[object Array]') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js
new file mode 100644
index 000000000..07d22dda5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-2-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js",
+
+description: "Object.keys returns the standard built-in Array that is extensible",
+
+test: function testcase() {
+ var o = { x: 1, y: 2};
+
+ var a = Object.keys(o);
+ if (Object.isExtensible(a) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys) && fnExists(Object.isExtensible);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js
new file mode 100644
index 000000000..778f40a52
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-2-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js",
+
+description: "Object.keys returns the standard built-in Array that is not sealed",
+
+test: function testcase() {
+ var o = { x: 1, y: 2};
+
+ var a = Object.keys(o);
+ if (Object.isSealed(a) === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys) && fnExists(Object.isSealed);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js
new file mode 100644
index 000000000..36a7bec35
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-2-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js",
+
+description: "Object.keys returns the standard built-in Array that is not frozen",
+
+test: function testcase() {
+ var o = { x: 1, y: 2};
+
+ var a = Object.keys(o);
+ if (Object.isFrozen(a) === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys) && fnExists(Object.isFrozen);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js
new file mode 100644
index 000000000..41be9b0dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-3-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js",
+
+description: "Object.keys returns the standard built-in Array containing own enumerable properties",
+
+test: function testcase() {
+ var o = { x: 1, y: 2};
+
+ var a = Object.keys(o);
+ if (a.length === 2 &&
+ a[0] === 'x' &&
+ a[1] === 'y') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js
new file mode 100644
index 000000000..0743e79b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-3-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js",
+
+description: "Object.keys returns the standard built-in Array containing own enumerable properties (function)",
+
+test: function testcase() {
+ function foo() {}
+ foo.x = 1;
+
+ var a = Object.keys(foo);
+ if (a.length === 1 &&
+ a[0] === 'x') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js
new file mode 100644
index 000000000..06f07e951
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-3-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js",
+
+description: "Object.keys returns the standard built-in Array containing own enumerable properties (array)",
+
+test: function testcase() {
+ var o = [1, 2];
+ var a = Object.keys(o);
+ if (a.length === 2 &&
+ a[0] === '0' &&
+ a[1] === '1') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js
new file mode 100644
index 000000000..24ea1602c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js
@@ -0,0 +1,54 @@
+// Copyright (c) 2009 Google, Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+// that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+// the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+// the following disclaimer in the documentation and/or other materials provided with the distribution.
+// * Neither the name of Microsoft nor the names of its contributors may be used to
+// endorse or promote products derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-3-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js",
+
+description: "Object.keys of an arguments object returns the indices of the given arguments",
+
+test: function testcase() {
+ function testArgs2(x, y, z) {
+ // Properties of the arguments object are enumerable.
+ var a = Object.keys(arguments);
+ if (a.length === 2 && a[0] === "0" && a[1] === "1")
+ return true;
+ }
+ function testArgs3(x, y, z) {
+ // Properties of the arguments object are enumerable.
+ var a = Object.keys(arguments);
+ if (a.length === 3 && a[0] === "0" && a[1] === "1" && a[2] === "2")
+ return true;
+ }
+ function testArgs4(x, y, z) {
+ // Properties of the arguments object are enumerable.
+ var a = Object.keys(arguments);
+ if (a.length === 4 && a[0] === "0" && a[1] === "1" && a[2] === "2" && a[3] === "3")
+ return true;
+ }
+ return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4);
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js
new file mode 100644
index 000000000..69c9dc27d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js
@@ -0,0 +1,41 @@
+// Copyright (c) 2009 Google, Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+// that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+// the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+// the following disclaimer in the documentation and/or other materials provided with the distribution.
+// * Neither the name of Microsoft nor the names of its contributors may be used to
+// endorse or promote products derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.14-3-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js",
+
+description: "Object.keys must return a fresh array on each invocation",
+
+test: function testcase() {
+ var literal = {a: 1};
+ var keysBefore = Object.keys(literal);
+ if (keysBefore[0] != 'a') return false;
+ keysBefore[0] = 'x';
+ var keysAfter = Object.keys(literal);
+ return (keysBefore[0] == 'x') && (keysAfter[0] == 'a');
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.keys);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js
new file mode 100644
index 000000000..3cc66e40b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js",
+
+description: "Object.getPrototypeOf must exist as a function",
+
+test: function testcase() {
+ if (typeof(Object.getPrototypeOf) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js
new file mode 100644
index 000000000..6450e9dfb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js",
+
+description: "Object.getPrototypeOf must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.getPrototypeOf.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js
new file mode 100644
index 000000000..26ce20d37
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-0-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js",
+
+description: "Object.getPrototypeOf must take 1 parameter",
+
+test: function testcase() {
+ try
+ {
+ Object.getPrototypeOf();
+ }
+ catch(e)
+ {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js
new file mode 100644
index 000000000..a6ba39d1f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js",
+
+description: "Object.getPrototypeOf throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.getPrototypeOf(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js
new file mode 100644
index 000000000..02dc62bbb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Boolean)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Boolean) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js
new file mode 100644
index 000000000..b26af5691
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-10",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (RegExp)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(RegExp) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js
new file mode 100644
index 000000000..e8c680cdb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-11",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Error)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Error) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js
new file mode 100644
index 000000000..49e1ec018
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-12",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (EvalError)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(EvalError) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js
new file mode 100644
index 000000000..ec9b7e820
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-13",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (RangeError)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(RangeError) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js
new file mode 100644
index 000000000..8267ce133
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-14",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (ReferenceError)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(ReferenceError) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js
new file mode 100644
index 000000000..a359d4bb4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-15",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (SyntaxError)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(SyntaxError) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js
new file mode 100644
index 000000000..55fd850aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-16",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (TypeError)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(TypeError) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js
new file mode 100644
index 000000000..96bdc12ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-17",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (URIError)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(URIError) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js
new file mode 100644
index 000000000..cc3e28280
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-18",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (JSON)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(JSON) === Object.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js
new file mode 100644
index 000000000..4b76f1a0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Let 'x' be the return value from getPrototypeOf when called on d.
+Then, x.isPrototypeOf(d) must be true.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (custom object)",
+
+test: function testcase() {
+ function base() {}
+
+ function derived() {}
+ derived.prototype = new base();
+
+ var d = new derived();
+ var x = Object.getPrototypeOf(d);
+ if (x.isPrototypeOf(d) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js
new file mode 100644
index 000000000..606651f9c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Object)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Object) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js
new file mode 100644
index 000000000..486423d3e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Function)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Function) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js
new file mode 100644
index 000000000..9b6c64504
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Array)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Array) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js
new file mode 100644
index 000000000..ea5afc3c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (String)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(String) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js
new file mode 100644
index 000000000..d7d83fbff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-7",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Number)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Number) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js
new file mode 100644
index 000000000..44b2006c4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-8",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Math)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Math) === Object.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js
new file mode 100644
index 000000000..0b2b5d5d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.2-2-9",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js",
+
+description: "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Date)",
+
+test: function testcase() {
+ if (Object.getPrototypeOf(Date) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js
new file mode 100644
index 000000000..27bfcd3e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js",
+
+description: "Object.getOwnPropertyDescriptor must exist as a function",
+
+test: function testcase() {
+ if (typeof(Object.getOwnPropertyDescriptor) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js
new file mode 100644
index 000000000..b010be22c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js",
+
+description: "Object.getOwnPropertyDescriptor must exist as a function taking 2 parameters",
+
+test: function testcase() {
+ if (Object.getOwnPropertyDescriptor.length === 2) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js
new file mode 100644
index 000000000..b130bb8cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-1-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js",
+
+ description: "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is undefined",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyDescriptor(undefined, "foo");
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js
new file mode 100644
index 000000000..429f41ba0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-1-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js",
+
+ description: "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is null",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyDescriptor(null, "foo");
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js
new file mode 100644
index 000000000..e2a26a67f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-1-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js",
+
+ description: "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is a boolean",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyDescriptor(true, "foo");
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js
new file mode 100644
index 000000000..d6f33d8da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-1-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js",
+
+ description: "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is a number",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyDescriptor(-2, "foo");
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js
new file mode 100644
index 000000000..c4a916318
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js",
+
+description: "Object.getOwnPropertyDescriptor throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.getOwnPropertyDescriptor(0, "foo");
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js
new file mode 100644
index 000000000..5b8d6a239
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-2-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js",
+
+description: "Object.getOwnPropertyDescriptor returns undefined for undefined property name",
+
+test: function testcase() {
+ var o = {};
+ var desc = Object.getOwnPropertyDescriptor(o, undefined);
+ if (desc === undefined) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js
new file mode 100644
index 000000000..4aa6efc1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is -0)",
+
+ test: function testcase() {
+ var obj = { "0": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, -0);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js
new file mode 100644
index 000000000..aeb965747
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-11",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is positive number)",
+
+ test: function testcase() {
+ var obj = { "30": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 30);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js
new file mode 100644
index 000000000..1a6fc4c75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-12",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is negative number)",
+
+ test: function testcase() {
+ var obj = { "-20": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, -20);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js
new file mode 100644
index 000000000..a6a93e7cc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-13",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is Infinity)",
+
+ test: function testcase() {
+ var obj = { "Infinity": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, Infinity);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js
new file mode 100644
index 000000000..f635151ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-14",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is +Infinity)",
+
+ test: function testcase() {
+ var obj = { "Infinity": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, +Infinity);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js
new file mode 100644
index 000000000..df7e712ee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-15",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is -Infinity)",
+
+ test: function testcase() {
+ var obj = { "-Infinity": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, -Infinity);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js
new file mode 100644
index 000000000..2384c03d4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-16",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 20 zeros))",
+
+ test: function testcase() {
+ var obj = { "100000000000000000000": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js
new file mode 100644
index 000000000..78b154fa9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-17",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 21 zeros))",
+
+ test: function testcase() {
+ var obj = { "1e+21": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1000000000000000000000);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js
new file mode 100644
index 000000000..5e9648abe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-18",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 22 zeros))",
+
+ test: function testcase() {
+ var obj = { "1e+22": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 10000000000000000000000);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js
new file mode 100644
index 000000000..65b1d73a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-19",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e+20)",
+
+ test: function testcase() {
+ var obj = { "100000000000000000000": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1e+20);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js
new file mode 100644
index 000000000..680af9666
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-2-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js",
+
+description: "Object.getOwnPropertyDescriptor returns undefined for null property name",
+
+test: function testcase() {
+ var o = {};
+ var desc = Object.getOwnPropertyDescriptor(o, null);
+ if (desc === undefined) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js
new file mode 100644
index 000000000..37f4dc087
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-20",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to string (value is 1e+21)",
+
+ test: function testcase() {
+ var obj = { "1e+21": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1e+21);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js
new file mode 100644
index 000000000..2312cbd48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-21",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e+22)",
+
+ test: function testcase() {
+ var obj = { "1e+22": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1e+22);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js
new file mode 100644
index 000000000..accb380a8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-22",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.000001)",
+
+ test: function testcase() {
+ var obj = { "0.000001": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 0.000001);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js
new file mode 100644
index 000000000..957a21aea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-23",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.0000001)",
+
+ test: function testcase() {
+ var obj = { "1e-7": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 0.0000001);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js
new file mode 100644
index 000000000..955f67e20
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-24",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.00000001)",
+
+ test: function testcase() {
+ var obj = { "1e-8": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 0.00000001);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js
new file mode 100644
index 000000000..b76af6eb1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-25",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-7)",
+
+ test: function testcase() {
+ var obj = { "1e-7": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1e-7);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js
new file mode 100644
index 000000000..0ee1a57d6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-26",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-6)",
+
+ test: function testcase() {
+ var obj = { "0.000001": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1e-6);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js
new file mode 100644
index 000000000..7b621b1db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-27",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-5)",
+
+ test: function testcase() {
+ var obj = { "0.00001": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1e-5);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js
new file mode 100644
index 000000000..74a9273df
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-28",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is an integer that converts to a string (value is 123)",
+
+ test: function testcase() {
+ var obj = { "123": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 123);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js
new file mode 100644
index 000000000..8a6e56fc4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-29",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a decimal that converts to a string (value is 123.456)",
+
+ test: function testcase() {
+ var obj = { "123.456": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 123.456);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js
new file mode 100644
index 000000000..e23d33c3a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is undefined",
+
+ test: function testcase() {
+ var obj = { "undefined": 1 };
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, undefined);
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "undefined");
+
+ return desc1.value === 1 && desc2.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js
new file mode 100644
index 000000000..ef3e4855e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-31",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 123.1234567)",
+
+ test: function testcase() {
+ var obj = { "123.1234567": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 123.1234567);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js
new file mode 100644
index 000000000..eeb484acd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-32",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is applied to an empty string ",
+
+ test: function testcase() {
+ var obj = { "": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "");
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js
new file mode 100644
index 000000000..c742fd781
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-33",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'AB\n\\cd' ",
+
+ test: function testcase() {
+ var obj = { "AB\n\\cd": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "AB\n\\cd");
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js
new file mode 100644
index 000000000..0a15ccc8c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js
@@ -0,0 +1,40 @@
+// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-34",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'undefined' ",
+
+ test: function testcase() {
+ var obj = { "undefined": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "undefined");
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js
new file mode 100644
index 000000000..52162a3a0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js
@@ -0,0 +1,40 @@
+// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-35",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'null' ",
+
+ test: function testcase() {
+ var obj = { "null": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "null");
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js
new file mode 100644
index 000000000..f51fa9f44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-36",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is applied to string '123¦Á¦Â¦Ðcd' ",
+
+ test: function testcase() {
+ var obj = { "123¦Á¦Â¦Ðcd": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "123¦Á¦Â¦Ðcd");
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js
new file mode 100644
index 000000000..d7e2be0bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-37",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is applied to string '1' ",
+
+ test: function testcase() {
+ var obj = { "1": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 1);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js
new file mode 100644
index 000000000..75336850c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-38",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is an array that converts to a string",
+
+ test: function testcase() {
+ var obj = { "1": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, [1]);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js
new file mode 100644
index 000000000..6d7ec7add
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-39",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a String Object that converts to a string",
+
+ test: function testcase() {
+ var obj = { "Hello": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, new String("Hello"));
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js
new file mode 100644
index 000000000..1255cf83d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is null that converts to string 'null'",
+
+ test: function testcase() {
+ var obj = { "null": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, null);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js
new file mode 100644
index 000000000..7b4334c41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-40",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a Boolean Object that converts to a string",
+
+ test: function testcase() {
+ var obj = { "true": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, new Boolean(true));
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js
new file mode 100644
index 000000000..99f516430
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-41",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a Number Object that converts to a string",
+
+ test: function testcase() {
+ var obj = { "123": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, new Number(123));
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js
new file mode 100644
index 000000000..3c2436687
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-42",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own toString method",
+
+ test: function testcase() {
+ var obj = { "abc": 1 };
+
+ var ownProp = {
+ toString: function () {
+ return "abc";
+ }
+ };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js
new file mode 100644
index 000000000..03b6a9f6b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-43",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own valueOf method",
+
+ test: function testcase() {
+ var obj = { "[object Object]": 1, "abc" : 2 };
+
+ var ownProp = {
+ valueOf: function () {
+ return "abc";
+ }
+ };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js
new file mode 100644
index 000000000..c6f8e2c29
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-44",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is an object that has an own toString method that returns an object and toValue method that returns a primitive value",
+
+ test: function testcase() {
+ var obj = { "abc": 1 };
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ var ownProp = {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return "abc";
+ }
+ };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
+
+ return desc.value === 1 && valueOfAccessed && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js
new file mode 100644
index 000000000..6c15d0e01
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-45",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own toString and valueOf method",
+
+ test: function testcase() {
+ var obj = { "bbq": 1, "abc": 2 };
+ var valueOfAccessed = false;
+
+ var ownProp = {
+ toString: function () {
+ return "bbq";
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return "abc";
+ }
+ };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, ownProp);
+
+ return desc.value === 1 && !valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js
new file mode 100644
index 000000000..46a55d835
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-46",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js",
+
+ description: "Object.getOwnPropertyDescriptor - TypeError exception was thrown when 'P' is an object that both toString and valueOf wouldn't return primitive value",
+
+ test: function testcase() {
+ var obj = { "1": 1 };
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var ownProp = {
+ toString: function () {
+ toStringAccessed = true;
+ return [1];
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return [1];
+ }
+ };
+
+ try {
+ Object.getOwnPropertyDescriptor(obj, ownProp);
+ return false;
+ } catch (e) {
+ return toStringAccessed && valueOfAccessed && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js
new file mode 100644
index 000000000..ec82cdc42
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-47",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js",
+
+ description: "Object.getOwnPropertyDescriptor - uses inherited toString method when 'P' is an object with an own valueOf and inherited toString methods",
+
+ test: function testcase() {
+ var proto = {};
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ proto.toString = function () {
+ toStringAccessed = true;
+ return "test";
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.valueOf = function () {
+ valueOfAccessed = true;
+ return "10";
+ };
+ var obj = { "10": "length1", "test": "length2" };
+ var desc = Object.getOwnPropertyDescriptor(obj, child);
+
+ return desc.value === "length2" && toStringAccessed && !valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js
new file mode 100644
index 000000000..cfd7bdecc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose value is false",
+
+ test: function testcase() {
+ var obj = { "false": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, false);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js
new file mode 100644
index 000000000..9248919c5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose value is true",
+
+ test: function testcase() {
+ var obj = { "true": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, true);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js
new file mode 100644
index 000000000..e0e4f0056
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-7",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is NaN)",
+
+ test: function testcase() {
+ var obj = { "NaN": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, NaN);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js
new file mode 100644
index 000000000..2215c24f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0)",
+
+ test: function testcase() {
+ var obj = { "0": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, 0);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js
new file mode 100644
index 000000000..9ce5fa03e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-2-9",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js",
+
+ description: "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is +0)",
+
+ test: function testcase() {
+ var obj = { "0": 1 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, +0);
+
+ return desc.value === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js
new file mode 100644
index 000000000..ef7f99a1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is own data property",
+
+ test: function testcase() {
+
+ var obj = {
+ property: "ownDataProperty"
+ };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.value === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js
new file mode 100644
index 000000000..8603dd156
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is not an existing property",
+
+ test: function testcase() {
+
+ var obj = {
+ property: "ownDataProperty"
+ };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "propertyNonExist");
+
+ return typeof desc === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-12.js
new file mode 100644
index 000000000..868884236
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-12.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-12",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-12.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'O' is the document host object and getOwnPropertyDescriptor should not walk-up prototype chain",
+
+ test: function testcase() {
+
+ var desc = Object.getOwnPropertyDescriptor(document, "forms");
+
+ return typeof desc === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js
new file mode 100644
index 000000000..f9cf5dbf8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-13",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js",
+
+ description: "Object.getOwnPropertyDescriptor applied to the Arguments object which implements its own property get method",
+
+ test: function testcase() {
+
+ var arg = (function () {
+ return arguments;
+ }("ownProperty", true));
+
+ var desc = Object.getOwnPropertyDescriptor(arg, "0");
+
+ return desc.value === "ownProperty" && desc.writable === true && desc.enumerable === true && desc.configurable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js
new file mode 100644
index 000000000..d0fb91b05
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-15",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js",
+
+ description: "Object.getOwnPropertyDescriptor applied to a Function object which implements its own property get method",
+
+ test: function testcase() {
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[1] = "ownProperty";
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "1");
+
+ return desc.value === "ownProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js
new file mode 100644
index 000000000..31d51eb1f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is inherited data property",
+
+ test: function testcase() {
+
+ var proto = {
+ property: "inheritedDataProperty"
+ };
+
+ var Con = function () { };
+ Con.ptototype = proto;
+
+ var child = new Con();
+
+ var desc = Object.getOwnPropertyDescriptor(child, "property");
+
+ return typeof desc === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js
new file mode 100644
index 000000000..520572067
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is own data property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ var proto = {
+ property: "inheritedDataProperty"
+ };
+
+ var Con = function () { };
+ Con.ptototype = proto;
+
+ var child = new Con();
+ child.property = "ownDataProperty";
+
+ var desc = Object.getOwnPropertyDescriptor(child, "property");
+
+ return desc.value === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js
new file mode 100644
index 000000000..38158eb0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is own data property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "property", {
+ get: function () {
+ return "inheritedDataProperty";
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.ptototype = proto;
+
+ var child = new Con();
+ Object.defineProperty(child, "property", {
+ value: "ownDataProperty",
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(child, "property");
+
+ return desc.value === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js
new file mode 100644
index 000000000..d0b439142
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is own accessor property",
+
+ test: function testcase() {
+
+ var obj = {};
+ var fun = function () {
+ return "ownAccessorProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.get === fun;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js
new file mode 100644
index 000000000..2610d8c50
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is inherited accessor property",
+
+ test: function testcase() {
+
+ var proto = {};
+ var fun = function () {
+ return "ownAccessorProperty";
+ };
+ Object.defineProperty(proto, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ var desc = Object.getOwnPropertyDescriptor(child, "property");
+
+ return typeof desc === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js
new file mode 100644
index 000000000..13da00c60
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-7",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ var proto = {
+ property: "inheritedDataProperty"
+ };
+
+ var Con = function () { };
+ Con.ptototype = proto;
+
+ var child = new Con();
+ var fun = function () {
+ return "ownAccessorProperty";
+ };
+ Object.defineProperty(child, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(child, "property");
+
+ return desc.get === fun;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js
new file mode 100644
index 000000000..b47bde25a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "property", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.ptototype = proto;
+
+ var child = new Con();
+ var fun = function () {
+ return "ownAccessorProperty";
+ };
+ Object.defineProperty(child, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(child, "property");
+
+ return desc.get === fun;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js
new file mode 100644
index 000000000..ff22efc8f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.3-3-9",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js",
+
+ description: "Object.getOwnPropertyDescriptor - 'P' is own accessor property without a get function",
+
+ test: function testcase() {
+
+ var obj = {};
+ var fun = function () { };
+ Object.defineProperty(obj, "property", {
+ set: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.set === fun;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js
new file mode 100644
index 000000000..ef7a09e0f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js",
+
+description: "Object.getOwnPropertyDescriptor returns an object representing a data desc for valid data valued properties",
+
+test: function testcase() {
+ var o = {};
+ o["foo"] = 101;
+
+ var desc = Object.getOwnPropertyDescriptor(o, "foo");
+ if (desc.value === 101 &&
+ desc.enumerable === true &&
+ desc.writable === true &&
+ desc.configurable === true &&
+ !desc.hasOwnProperty("get") &&
+ !desc.hasOwnProperty("set")) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js
new file mode 100644
index 000000000..960e13a7e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-10",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.decodeURIComponent)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "decodeURIComponent");
+ if (desc.value === global.decodeURIComponent &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js
new file mode 100644
index 000000000..51b2b2f16
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-100",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.atan2)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "atan2");
+ if (desc.value === Math.atan2 &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js
new file mode 100644
index 000000000..e36db0b67
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-101",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.ceil)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "ceil");
+ if (desc.value === Math.ceil &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js
new file mode 100644
index 000000000..e982caa3f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-102",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.cos)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "cos");
+ if (desc.value === Math.cos &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js
new file mode 100644
index 000000000..90434835a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-103",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.exp)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "exp");
+ if (desc.value === Math.exp &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js
new file mode 100644
index 000000000..aeb61877b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-104",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.floor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "floor");
+ if (desc.value === Math.floor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js
new file mode 100644
index 000000000..92aa9ed72
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-105",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.log)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "log");
+ if (desc.value === Math.log &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js
new file mode 100644
index 000000000..c88e27335
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-106",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.max)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "max");
+ if (desc.value === Math.max &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js
new file mode 100644
index 000000000..65526d513
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-107",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.min)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "min");
+ if (desc.value === Math.min &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js
new file mode 100644
index 000000000..b88fda14d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-108",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.pow)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "pow");
+ if (desc.value === Math.pow &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js
new file mode 100644
index 000000000..64e618ef0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-109",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.random)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "random");
+ if (desc.value === Math.random &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js
new file mode 100644
index 000000000..9124b5157
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-11",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.encodeURIComponent)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "encodeURIComponent");
+ if (desc.value === global.encodeURIComponent &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js
new file mode 100644
index 000000000..7cb3b292a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-110",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.round)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "round");
+ if (desc.value === Math.round &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js
new file mode 100644
index 000000000..a2c7310e4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-111",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.sin)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "sin");
+ if (desc.value === Math.sin &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js
new file mode 100644
index 000000000..084698770
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-112",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.sqrt)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "sqrt");
+ if (desc.value === Math.sqrt &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js
new file mode 100644
index 000000000..40e7cebab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-113",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.tan)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "tan");
+ if (desc.value === Math.tan &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js
new file mode 100644
index 000000000..d84f4b924
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-114",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.parse)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date, "parse");
+ if (desc.value === Date.parse &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js
new file mode 100644
index 000000000..ee5e29808
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-115",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.UTC)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date, "UTC");
+ if (desc.value === Date.UTC &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js
new file mode 100644
index 000000000..c1f984180
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-116",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "constructor");
+ if (desc.value === Date.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js
new file mode 100644
index 000000000..0273c68af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-117",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getTime)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTime");
+ if (desc.value === Date.prototype.getTime &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js
new file mode 100644
index 000000000..7b80eb896
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-118",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getTimezoneOffset)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getTimezoneOffset");
+ if (desc.value === Date.prototype.getTimezoneOffset &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-119.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-119.js
new file mode 100644
index 000000000..7ecf206db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-119.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-119",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-119.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getYear)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getYear");
+ if (desc.value === Date.prototype.getYear &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-12.js
new file mode 100644
index 000000000..6725d1afe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-12.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-12",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-12.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "escape");
+ if (desc.value === global.escape &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js
new file mode 100644
index 000000000..4a768819b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-120",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getFullYear)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getFullYear");
+ if (desc.value === Date.prototype.getFullYear &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js
new file mode 100644
index 000000000..dfa3888d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-121",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMonth)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMonth");
+ if (desc.value === Date.prototype.getMonth &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js
new file mode 100644
index 000000000..8a50ac81e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-122",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getDate)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDate");
+ if (desc.value === Date.prototype.getDate &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js
new file mode 100644
index 000000000..e926c020e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-123",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getDay)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getDay");
+ if (desc.value === Date.prototype.getDay &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js
new file mode 100644
index 000000000..d40660d1f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-124",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getHours)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getHours");
+ if (desc.value === Date.prototype.getHours &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js
new file mode 100644
index 000000000..36f5884ee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-125",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMinutes)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMinutes");
+ if (desc.value === Date.prototype.getMinutes &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js
new file mode 100644
index 000000000..d495cc408
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-126",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getSeconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getSeconds");
+ if (desc.value === Date.prototype.getSeconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js
new file mode 100644
index 000000000..b66b9eda2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-127",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMilliseconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getMilliseconds");
+ if (desc.value === Date.prototype.getMilliseconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js
new file mode 100644
index 000000000..31cb53eaf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-128",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCFullYear)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCFullYear");
+ if (desc.value === Date.prototype.getUTCFullYear &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js
new file mode 100644
index 000000000..ad332c81f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-129",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMonth)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMonth");
+ if (desc.value === Date.prototype.getUTCMonth &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-13.js
new file mode 100644
index 000000000..af10969b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-13.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-13",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-13.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.unescape)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "unescape");
+ if (desc.value === global.unescape &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js
new file mode 100644
index 000000000..ac1e39469
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-130",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCDate)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDate");
+ if (desc.value === Date.prototype.getUTCDate &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js
new file mode 100644
index 000000000..49d3904aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-131",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCDay)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCDay");
+ if (desc.value === Date.prototype.getUTCDay &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js
new file mode 100644
index 000000000..91a2bcb27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-132",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCHours)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCHours");
+ if (desc.value === Date.prototype.getUTCHours &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js
new file mode 100644
index 000000000..e73888196
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-133",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMinutes)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMinutes");
+ if (desc.value === Date.prototype.getUTCMinutes &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js
new file mode 100644
index 000000000..68ec67538
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-134",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCSeconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCSeconds");
+ if (desc.value === Date.prototype.getUTCSeconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js
new file mode 100644
index 000000000..72a8bf579
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-135",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMilliseconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "getUTCMilliseconds");
+ if (desc.value === Date.prototype.getUTCMilliseconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js
new file mode 100644
index 000000000..77b9b1050
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-136",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setTime)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setTime");
+ if (desc.value === Date.prototype.setTime &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-137.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-137.js
new file mode 100644
index 000000000..b7298cbf6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-137.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-137",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-137.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setYear)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setYear");
+ if (desc.value === Date.prototype.setYear &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js
new file mode 100644
index 000000000..b39fb1528
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-138",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setFullYear)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setFullYear");
+ if (desc.value === Date.prototype.setFullYear &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js
new file mode 100644
index 000000000..d858127c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-139",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMonth)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMonth");
+ if (desc.value === Date.prototype.setMonth &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js
new file mode 100644
index 000000000..997ff5d48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-14",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getPrototypeOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "getPrototypeOf");
+ if (desc.value === Object.getPrototypeOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js
new file mode 100644
index 000000000..0cc04867c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-140",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setDate)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setDate");
+ if (desc.value === Date.prototype.setDate &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js
new file mode 100644
index 000000000..383636792
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-141",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setHours)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setHours");
+ if (desc.value === Date.prototype.setHours &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js
new file mode 100644
index 000000000..40d23a33e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-142",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMinutes)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMinutes");
+ if (desc.value === Date.prototype.setMinutes &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js
new file mode 100644
index 000000000..f1928388e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-143",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setSeconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setSeconds");
+ if (desc.value === Date.prototype.setSeconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js
new file mode 100644
index 000000000..be4e0e9f3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-144",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMilliseconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setMilliseconds");
+ if (desc.value === Date.prototype.setMilliseconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js
new file mode 100644
index 000000000..911e52f9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-145",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCFullYear)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCFullYear");
+ if (desc.value === Date.prototype.setUTCFullYear &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js
new file mode 100644
index 000000000..a613062d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-146",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMonth)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMonth");
+ if (desc.value === Date.prototype.setUTCMonth &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js
new file mode 100644
index 000000000..bfa3f2f9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-147",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCDate)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCDate");
+ if (desc.value === Date.prototype.setUTCDate &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js
new file mode 100644
index 000000000..f0d5c805c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-148",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCHours)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCHours");
+ if (desc.value === Date.prototype.setUTCHours &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js
new file mode 100644
index 000000000..ef25c3f38
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-149",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMinutes)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMinutes");
+ if (desc.value === Date.prototype.setUTCMinutes &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js
new file mode 100644
index 000000000..a963e8ac8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-15",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getOwnPropertyDescriptor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyDescriptor");
+ if (desc.value === Object.getOwnPropertyDescriptor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js
new file mode 100644
index 000000000..68ca70310
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-150",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCSeconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCSeconds");
+ if (desc.value === Date.prototype.setUTCSeconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js
new file mode 100644
index 000000000..877d514e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-151",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMilliseconds)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "setUTCMilliseconds");
+ if (desc.value === Date.prototype.setUTCMilliseconds &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js
new file mode 100644
index 000000000..d4859c049
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-152",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleString");
+ if (desc.value === Date.prototype.toLocaleString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js
new file mode 100644
index 000000000..16ab486cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-153",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toString");
+ if (desc.value === Date.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js
new file mode 100644
index 000000000..a01eeb85e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-154",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toUTCString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toUTCString");
+ if (desc.value === Date.prototype.toUTCString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js
new file mode 100644
index 000000000..3dc0b762e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-155",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toGMTString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toGMTString");
+ if (desc.value === Date.prototype.toGMTString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js
new file mode 100644
index 000000000..8b0ff0bd5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-156",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toTimeString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toTimeString");
+ if (desc.value === Date.prototype.toTimeString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js
new file mode 100644
index 000000000..6ba84bc5f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-157",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toDateString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toDateString");
+ if (desc.value === Date.prototype.toDateString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js
new file mode 100644
index 000000000..ffbf4efec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-158",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleDateString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleDateString");
+ if (desc.value === Date.prototype.toLocaleDateString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js
new file mode 100644
index 000000000..8cecf6122
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-159",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleTimeString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toLocaleTimeString");
+ if (desc.value === Date.prototype.toLocaleTimeString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js
new file mode 100644
index 000000000..f08e4a8e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-16",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getOwnPropertyNames)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyNames");
+ if (desc.value === Object.getOwnPropertyNames &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js
new file mode 100644
index 000000000..2877eb6e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-160",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.valueOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "valueOf");
+ if (desc.value === Date.prototype.valueOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js
new file mode 100644
index 000000000..b285e9a50
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-161",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toISOString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString");
+ if (desc.value === Date.prototype.toISOString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js
new file mode 100644
index 000000000..850d42e4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-162",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toJSON)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON");
+ if (desc.value === Date.prototype.toJSON &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js
new file mode 100644
index 000000000..a300d3921
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-163",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "constructor");
+ if (desc.value === RegExp.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-164.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-164.js
new file mode 100644
index 000000000..3bb0fee23
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-164.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-164",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-164.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.compile)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "compile");
+ if (desc.value === RegExp.prototype.compile &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js
new file mode 100644
index 000000000..a9973a199
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-165",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.exec)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "exec");
+ if (desc.value === RegExp.prototype.exec &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js
new file mode 100644
index 000000000..0946f3c48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-166",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.test)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "test");
+ if (desc.value === RegExp.prototype.test &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js
new file mode 100644
index 000000000..9f5b072d7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-167",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "toString");
+ if (desc.value === RegExp.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js
new file mode 100644
index 000000000..05761d4c5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-168",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Error.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Error.prototype, "constructor");
+ if (desc.value === Error.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js
new file mode 100644
index 000000000..32c65e798
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-169",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Error.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Error.prototype, "toString");
+ if (desc.value === Error.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js
new file mode 100644
index 000000000..bba6888e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-17",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.create)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "create");
+ if (desc.value === Object.create &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js
new file mode 100644
index 000000000..d59a21b9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-170",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (EvalError.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(EvalError.prototype, "constructor");
+ if (desc.value === EvalError.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js
new file mode 100644
index 000000000..75c0ae8a1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-171",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RangeError.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RangeError.prototype, "constructor");
+ if (desc.value === RangeError.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js
new file mode 100644
index 000000000..381faa5cc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-172",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (ReferenceError.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(ReferenceError.prototype, "constructor");
+ if (desc.value === ReferenceError.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js
new file mode 100644
index 000000000..65b94c947
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-173",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (SyntaxError.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(SyntaxError.prototype, "constructor");
+ if (desc.value === SyntaxError.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js
new file mode 100644
index 000000000..1d7af99c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-174",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (TypeError.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(TypeError.prototype, "constructor");
+ if (desc.value === TypeError.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js
new file mode 100644
index 000000000..388b5d620
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-175",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (URIError.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(URIError.prototype, "constructor");
+ if (desc.value === URIError.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js
new file mode 100644
index 000000000..869f49832
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-176",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (JSON.stringify)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(JSON, "stringify");
+ if (desc.value === JSON.stringify &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js
new file mode 100644
index 000000000..b58514a12
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-177",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (JSON.parse)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(JSON, "parse");
+ if (desc.value === JSON.parse &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js
new file mode 100644
index 000000000..fb597333d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-178",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.NaN)",
+
+test: function testcase() {
+ // in non-strict mode, 'this' is bound to the global object.
+ var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "NaN");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js
new file mode 100644
index 000000000..83ebdf267
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-179",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.Infinity)",
+
+test: function testcase() {
+ // in non-strict mode, 'this' is bound to the global object.
+ var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "Infinity");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js
new file mode 100644
index 000000000..d324572a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-18",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.defineProperty)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "defineProperty");
+ if (desc.value === Object.defineProperty &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js
new file mode 100644
index 000000000..7862bb168
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-180",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.undefined)",
+
+test: function testcase() {
+ // in non-strict mode, 'this' is bound to the global object.
+ var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "undefined");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js
new file mode 100644
index 000000000..ae85d7815
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-182",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Object.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js
new file mode 100644
index 000000000..d6aef42ee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-185",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js
new file mode 100644
index 000000000..3b84f9f44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-186",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function.length)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function, "length");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js
new file mode 100644
index 000000000..a7da8084d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-187",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function (instance).length)",
+
+test: function testcase() {
+ var f = Function('return 42;');
+
+ var desc = Object.getOwnPropertyDescriptor(f, "length");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
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
new file mode 100644
index 000000000..45fca8709
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-188",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js",
+
+description: "Object.getOwnPropertyDescriptor returns undefined for non-existent properties on built-ins (Function (instance).name)",
+
+test: function testcase() {
+ var f = Function('return 42;');
+
+ var desc = Object.getOwnPropertyDescriptor(f, "name");
+
+ if (desc === undefined) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js
new file mode 100644
index 000000000..a97db44d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-189",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Array.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js
new file mode 100644
index 000000000..87eb7466a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-19",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.defineProperties)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "defineProperties");
+ if (desc.value === Object.defineProperties &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js
new file mode 100644
index 000000000..8d620c7d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-190",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js
new file mode 100644
index 000000000..6728101da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-191",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String.length)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String, "length");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js
new file mode 100644
index 000000000..7d3599e2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-192",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String (instance).length)",
+
+test: function testcase() {
+ var s = new String("abc");
+ var desc = Object.getOwnPropertyDescriptor(s, "length");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js
new file mode 100644
index 000000000..d8605339a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-193",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Boolean.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Boolean, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js
new file mode 100644
index 000000000..b9a78a96d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-194",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Boolean.length)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Boolean, "length");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js
new file mode 100644
index 000000000..0d5d9eda0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-195",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js
new file mode 100644
index 000000000..947e6fe69
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-196",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.MAX_VALUE)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number, "MAX_VALUE");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js
new file mode 100644
index 000000000..520917660
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-197",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.MIN_VALUE)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number, "MIN_VALUE");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js
new file mode 100644
index 000000000..e9c17eab0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-198",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.NaN)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number, "NaN");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js
new file mode 100644
index 000000000..234bf89fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-199",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.NEGATIVE_INFINITY)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number, "NEGATIVE_INFINITY");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js
new file mode 100644
index 000000000..8bbe753d4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js",
+
+description: "Object.getOwnPropertyDescriptor returns undefined for non-existent properties",
+
+test: function testcase() {
+ var o = {};
+
+ var desc = Object.getOwnPropertyDescriptor(o, "foo");
+ if (desc === undefined) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js
new file mode 100644
index 000000000..792671541
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-20",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.seal)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "seal");
+ if (desc.value === Object.seal &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js
new file mode 100644
index 000000000..58b091dee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-200",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.POSITIVE_INFINITY)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number, "POSITIVE_INFINITY");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js
new file mode 100644
index 000000000..8702e73a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-201",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.length)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number, "length");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js
new file mode 100644
index 000000000..2f974250d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-202",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.E)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "E");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js
new file mode 100644
index 000000000..adef1b1b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-203",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LN10)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "LN10");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js
new file mode 100644
index 000000000..64b0b5dad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-204",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LN2)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "LN2");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js
new file mode 100644
index 000000000..20789ac36
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-205",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LOG2E)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "LOG2E");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js
new file mode 100644
index 000000000..3e6d05d11
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-206",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LOG10E)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "LOG10E");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js
new file mode 100644
index 000000000..adf65bdb3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-207",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.PI)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "PI");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js
new file mode 100644
index 000000000..32fefe0e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-208",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.SQRT1_2)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "SQRT1_2");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js
new file mode 100644
index 000000000..f2f34dc6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-209",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.SQRT2)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "SQRT2");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js
new file mode 100644
index 000000000..e4ec40443
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-21",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.freeze)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "freeze");
+ if (desc.value === Object.freeze &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js
new file mode 100644
index 000000000..f378201c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-210",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Date.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js
new file mode 100644
index 000000000..935519b79
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-211",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js
new file mode 100644
index 000000000..331f57019
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-212",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.source)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "source");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js
new file mode 100644
index 000000000..d9343172f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-213",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.global)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "global");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js
new file mode 100644
index 000000000..7ae0cc17f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-214",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.ignoreCase)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "ignoreCase");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js
new file mode 100644
index 000000000..d7bb4e1b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-215",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.multiline)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, "multiline");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js
new file mode 100644
index 000000000..5158c5e67
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-216",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Error.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Error, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js
new file mode 100644
index 000000000..a79426074
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-217",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (EvalError.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(EvalError, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js
new file mode 100644
index 000000000..7669c3666
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-218",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RangeError.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(RangeError, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js
new file mode 100644
index 000000000..2e2df4432
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-219",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (ReferenceError.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(ReferenceError, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js
new file mode 100644
index 000000000..429d4d4a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-22",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.preventExtensions)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "preventExtensions");
+ if (desc.value === Object.preventExtensions &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js
new file mode 100644
index 000000000..037a6e643
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-220",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (SyntaxError.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(SyntaxError, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js
new file mode 100644
index 000000000..cb6aa975c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-221",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (TypeError.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(TypeError, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js
new file mode 100644
index 000000000..86d5e0c01
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-222",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (URIError.prototype)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(URIError, "prototype");
+
+ if (desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js
new file mode 100644
index 000000000..6f8956921
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-223",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'value' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.value === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js
new file mode 100644
index 000000000..6d0875950
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-224",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'writable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ try {
+ desc.value = "overwriteDataProperty";
+ return desc.value === "overwriteDataProperty";
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js
new file mode 100644
index 000000000..5375e5b93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-225",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'enumerable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ var accessed = false;
+
+ for (var prop in desc) {
+ if (prop === "value") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js
new file mode 100644
index 000000000..61e290acd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-226",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'configurable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ var propDefined = "value" in desc;
+
+ try {
+ delete desc.value;
+ var propDeleted = "value" in desc;
+
+ return propDefined && !propDeleted;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js
new file mode 100644
index 000000000..f890b6b04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-227",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'value' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.writable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js
new file mode 100644
index 000000000..47ee8cd38
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js
@@ -0,0 +1,45 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-228",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'writable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ try {
+ desc.writable = "overwriteDataProperty";
+ return desc.writable === "overwriteDataProperty";
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js
new file mode 100644
index 000000000..60a8ac9b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-229",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'enumerable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ var accessed = false;
+
+ for (var props in desc) {
+ if (props === "writable") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js
new file mode 100644
index 000000000..2743c3d9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-23",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isSealed)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "isSealed");
+ if (desc.value === Object.isSealed &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js
new file mode 100644
index 000000000..6810feb21
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-230",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'configurable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ var propDefined = ("writable" in desc);
+
+ try {
+ delete desc.writable;
+ var propDeleted = "writable" in desc;
+
+ return propDefined && !propDeleted;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js
new file mode 100644
index 000000000..fea636cd3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-231",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'value' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.enumerable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js
new file mode 100644
index 000000000..22335aaf7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-232",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'writable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ try {
+ desc.enumerable = "overwriteDataProperty";
+ return desc.enumerable === "overwriteDataProperty";
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js
new file mode 100644
index 000000000..2ec00da50
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-233",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'enumerable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ var accessed = false;
+
+ for (var props in desc) {
+ if (props === "enumerable") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js
new file mode 100644
index 000000000..be24fb337
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-234",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'configurable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ var propDefined = "enumerable" in desc;
+
+ try {
+ delete desc.enumerable;
+ var propDeleted = "enumerable" in desc;
+
+ return propDefined && !propDeleted;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js
new file mode 100644
index 000000000..3cc810816
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-235",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'value' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.configurable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js
new file mode 100644
index 000000000..a8086bd85
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-236",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'writable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ try {
+ desc.writable = "overwriteDataProperty";
+ return desc.writable === "overwriteDataProperty";
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js
new file mode 100644
index 000000000..e58a289f3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-237",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'enumerable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ var accessed = false;
+
+ for (var prop in desc) {
+ if (prop === "configurable") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js
new file mode 100644
index 000000000..83697eff4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-238",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'configurable' attribute",
+
+ test: function testcase() {
+ var obj = { "property": "ownDataProperty" };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ var propDefined = "configurable" in desc;
+
+ try {
+ delete desc.configurable;
+ var propDeleted = "configurable" in desc;
+
+ return propDefined && !propDeleted;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js
new file mode 100644
index 000000000..3255baa39
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-239",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'value' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownDataProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.get === fun;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js
new file mode 100644
index 000000000..8a8f8be43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-24",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isFrozen)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "isFrozen");
+ if (desc.value === Object.isFrozen &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js
new file mode 100644
index 000000000..4c8667ccb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-240",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'writable' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownGetProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ try {
+ desc.get = "overwriteGetProperty";
+ return desc.get === "overwriteGetProperty";
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js
new file mode 100644
index 000000000..7268cbef1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-241",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'enumerable' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownDataProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ var accessed = false;
+
+ for (var prop in desc) {
+ if (prop === "get") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js
new file mode 100644
index 000000000..53f4de600
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-242",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'configurable' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownDataProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ get: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ var propDefined = "get" in desc;
+
+ try {
+ delete desc.get;
+ var propDeleted = "get" in desc;
+
+ return propDefined && !propDeleted;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js
new file mode 100644
index 000000000..36f0b57ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-243",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'value' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownSetProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ set: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc.set === fun;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js
new file mode 100644
index 000000000..c327020de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-244",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'writable' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownSetProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ set: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ try {
+ desc.set = "overwriteSetProperty";
+ return desc.set === "overwriteSetProperty";
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js
new file mode 100644
index 000000000..1755f8f86
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-245",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'enumerable' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownSetProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ set: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ var accessed = false;
+
+ for (var prop in desc) {
+ if (prop === "set") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js
new file mode 100644
index 000000000..da09e4cb7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-246",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js",
+
+ description: "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'configurable' attribute",
+
+ test: function testcase() {
+ var obj = {};
+ var fun = function () {
+ return "ownSetProperty";
+ };
+ Object.defineProperty(obj, "property", {
+ set: fun,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ var propDefined = "set" in desc;
+
+ try {
+ delete desc.set;
+ var propDeleted = "set" in desc;
+
+ return propDefined && !propDeleted;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js
new file mode 100644
index 000000000..f44317407
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-247",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js",
+
+ description: "Object.getOwnPropertyDescriptor - returned value is an instance of object",
+
+ test: function testcase() {
+ var obj = { "property": 100 };
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return desc instanceof Object;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js
new file mode 100644
index 000000000..0ccbc8990
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-248",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js",
+
+ description: "Object.getOwnPropertyDescriptor - returned object contains the property 'value' if the value of property 'value' is not explicitly specified when defined by Object.defineProperty",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "property", {
+ writable: true,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return "value" in desc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js
new file mode 100644
index 000000000..f1b34e3c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-249",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js",
+
+ description: "Object.getOwnPropertyDescriptor - returned object contains the property 'set' if the value of property 'set' is not explicitly specified when defined by Object.defineProperty.",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "property", {
+ get: function () { },
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return "set" in desc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js
new file mode 100644
index 000000000..8d03a82ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-25",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isExtensible)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "isExtensible");
+ if (desc.value === Object.isExtensible &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js
new file mode 100644
index 000000000..8d2685e83
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.3-4-250",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js",
+
+ description: "Object.getOwnPropertyDescriptor - returned object contains the property 'get' if the value of property 'get' is not explicitly specified when defined by Object.defineProperty.",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "property", {
+ set: function () {},
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+
+ return "get" in desc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js
new file mode 100644
index 000000000..62b0ded17
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-26",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.keys)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "keys");
+ if (desc.value === Object.keys &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js
new file mode 100644
index 000000000..7909e6fb4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-27",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object.prototype, "constructor");
+ if (desc.value === Object.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js
new file mode 100644
index 000000000..f7aa9e822
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-28",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toString");
+ if (desc.value === Object.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js
new file mode 100644
index 000000000..88109be10
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-29",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.valueOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object.prototype, "valueOf");
+ if (desc.value === Object.prototype.valueOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js
new file mode 100644
index 000000000..db856cd5f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js",
+
+description: "Object.getOwnPropertyDescriptor returns an object representing an accessor desc for valid accessor properties",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = function () { return 1; }
+ var d = { get: getter };
+
+ Object.defineProperty(o, "foo", d);
+
+ var desc = Object.getOwnPropertyDescriptor(o, "foo");
+ if (desc.get === getter &&
+ desc.set === undefined &&
+ desc.enumerable === false &&
+ desc.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js
new file mode 100644
index 000000000..b1f5bc632
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-30",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.isPrototypeOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object.prototype, "isPrototypeOf");
+ if (desc.value === Object.prototype.isPrototypeOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js
new file mode 100644
index 000000000..38f207fb6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-31",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.hasOwnProperty)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object.prototype, "hasOwnProperty");
+ if (desc.value === Object.prototype.hasOwnProperty &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js
new file mode 100644
index 000000000..5d9577740
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-32",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.propertyIsEnumerable)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object.prototype, "propertyIsEnumerable");
+ if (desc.value === Object.prototype.propertyIsEnumerable &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js
new file mode 100644
index 000000000..d78954b2f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-33",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.toLocaleString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object.prototype, "toLocaleString");
+ if (desc.value === Object.prototype.toLocaleString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js
new file mode 100644
index 000000000..c0b79d39c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-34",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function.prototype, "constructor");
+ if (desc.value === Function.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js
new file mode 100644
index 000000000..13634976c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-35",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
+ if (desc.value === Function.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js
new file mode 100644
index 000000000..86aad6109
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-36",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.apply)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function.prototype, "apply");
+ if (desc.value === Function.prototype.apply &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js
new file mode 100644
index 000000000..ac3c4687c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-37",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.call)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function.prototype, "call");
+ if (desc.value === Function.prototype.call &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js
new file mode 100644
index 000000000..dc3820f72
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-38",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.bind)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind");
+ if (desc.value === Function.prototype.bind &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js
new file mode 100644
index 000000000..a741f5de3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-39",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "constructor");
+ if (desc.value === Array.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js
new file mode 100644
index 000000000..0a4a3f345
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.eval)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "eval");
+ if (desc.value === global.eval &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js
new file mode 100644
index 000000000..ece658254
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-40",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.concat)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "concat");
+ if (desc.value === Array.prototype.concat &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js
new file mode 100644
index 000000000..d6203c8af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-41",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.join)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "join");
+ if (desc.value === Array.prototype.join &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js
new file mode 100644
index 000000000..4cc861ced
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-42",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reverse)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reverse");
+ if (desc.value === Array.prototype.reverse &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js
new file mode 100644
index 000000000..62ab79fe4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-43",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.slice)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "slice");
+ if (desc.value === Array.prototype.slice &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js
new file mode 100644
index 000000000..83ae680e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-44",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.sort)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "sort");
+ if (desc.value === Array.prototype.sort &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js
new file mode 100644
index 000000000..f5010e58d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-45",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toString");
+ if (desc.value === Array.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js
new file mode 100644
index 000000000..9f22dac69
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-46",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.push)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "push");
+ if (desc.value === Array.prototype.push &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js
new file mode 100644
index 000000000..949db471c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-47",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.pop)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "pop");
+ if (desc.value === Array.prototype.pop &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js
new file mode 100644
index 000000000..a0d0db419
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-48",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.shift)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "shift");
+ if (desc.value === Array.prototype.shift &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js
new file mode 100644
index 000000000..8aee28d7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-49",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.unshift)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "unshift");
+ if (desc.value === Array.prototype.unshift &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js
new file mode 100644
index 000000000..ec5a5911b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.parseInt)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "parseInt");
+ if (desc.value === global.parseInt &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js
new file mode 100644
index 000000000..10015a9b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-50",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.splice)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "splice");
+ if (desc.value === Array.prototype.splice &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js
new file mode 100644
index 000000000..fc7614f5c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-51",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.toLocaleString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "toLocaleString");
+ if (desc.value === Array.prototype.toLocaleString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js
new file mode 100644
index 000000000..ecb8dabd5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-52",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.indexOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf");
+ if (desc.value === Array.prototype.indexOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js
new file mode 100644
index 000000000..460e896c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-53",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.lastIndexOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf");
+ if (desc.value === Array.prototype.lastIndexOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js
new file mode 100644
index 000000000..83de4a9ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-54",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.every)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every");
+ if (desc.value === Array.prototype.every &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js
new file mode 100644
index 000000000..d56a17c75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-55",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.some)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some");
+ if (desc.value === Array.prototype.some &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js
new file mode 100644
index 000000000..dce7e71f8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-56",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.forEach)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach");
+ if (desc.value === Array.prototype.forEach &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js
new file mode 100644
index 000000000..edc881ed5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-57",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.map)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map");
+ if (desc.value === Array.prototype.map &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js
new file mode 100644
index 000000000..ae7f223d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-58",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.filter)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter");
+ if (desc.value === Array.prototype.filter &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js
new file mode 100644
index 000000000..c5d407961
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-59",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reduce)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce");
+ if (desc.value === Array.prototype.reduce &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js
new file mode 100644
index 000000000..e37129d1f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.parseFloat)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "parseFloat");
+ if (desc.value === global.parseFloat &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js
new file mode 100644
index 000000000..89308b3d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-60",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reduceRight)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight");
+ if (desc.value === Array.prototype.reduceRight &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js
new file mode 100644
index 000000000..9f2167b26
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-61",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.fromCharCode)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String, "fromCharCode");
+ if (desc.value === String.fromCharCode &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js
new file mode 100644
index 000000000..11f9dd31b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-62",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "constructor");
+ if (desc.value === String.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js
new file mode 100644
index 000000000..528bfa425
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-63",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.charAt)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "charAt");
+ if (desc.value === String.prototype.charAt &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js
new file mode 100644
index 000000000..388bf6ad2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-64",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.charCodeAt)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "charCodeAt");
+ if (desc.value === String.prototype.charCodeAt &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js
new file mode 100644
index 000000000..5b2776e21
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-65",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.concat)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "concat");
+ if (desc.value === String.prototype.concat &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js
new file mode 100644
index 000000000..a1881ba53
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-66",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.indexOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "indexOf");
+ if (desc.value === String.prototype.indexOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js
new file mode 100644
index 000000000..ccfed1344
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-67",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.lastIndexOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "lastIndexOf");
+ if (desc.value === String.prototype.lastIndexOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js
new file mode 100644
index 000000000..bd10bc92a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-68",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.match)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "match");
+ if (desc.value === String.prototype.match &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js
new file mode 100644
index 000000000..39de05d52
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-69",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.replace)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "replace");
+ if (desc.value === String.prototype.replace &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js
new file mode 100644
index 000000000..a6fe011f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-7",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.isNaN)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "isNaN");
+ if (desc.value === global.isNaN &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js
new file mode 100644
index 000000000..f5ad14ede
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-70",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.search)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "search");
+ if (desc.value === String.prototype.search &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js
new file mode 100644
index 000000000..40436dfd7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-71",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.slice)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "slice");
+ if (desc.value === String.prototype.slice &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js
new file mode 100644
index 000000000..6e3694a9b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-72",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.split)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "split");
+ if (desc.value === String.prototype.split &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js
new file mode 100644
index 000000000..be98064fb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-73",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substring)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "substring");
+ if (desc.value === String.prototype.substring &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-74.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-74.js
new file mode 100644
index 000000000..69d41facc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-74.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-74",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-74.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substr)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "substr");
+ if (desc.value === String.prototype.substr &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js
new file mode 100644
index 000000000..18f8b3696
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-75",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLowerCase)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLowerCase");
+ if (desc.value === String.prototype.toLowerCase &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js
new file mode 100644
index 000000000..d67ae6a27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-76",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "toString");
+ if (desc.value === String.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js
new file mode 100644
index 000000000..ba834eb8e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-77",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toUpperCase)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "toUpperCase");
+ if (desc.value === String.prototype.toUpperCase &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js
new file mode 100644
index 000000000..547c577aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-78",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.valueOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "valueOf");
+ if (desc.value === String.prototype.valueOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js
new file mode 100644
index 000000000..153706cab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-79",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLocaleLowerCase)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleLowerCase");
+ if (desc.value === String.prototype.toLocaleLowerCase &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js
new file mode 100644
index 000000000..b9f05b46f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-8",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.isFinite)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "isFinite");
+ if (desc.value === global.isFinite &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js
new file mode 100644
index 000000000..0a3a47a80
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-80",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLocaleUpperCase)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "toLocaleUpperCase");
+ if (desc.value === String.prototype.toLocaleUpperCase &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js
new file mode 100644
index 000000000..f641355e4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-81",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.localeCompare)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "localeCompare");
+ if (desc.value === String.prototype.localeCompare &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js
new file mode 100644
index 000000000..7b0a3a14c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-82",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.trim)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim");
+ if (desc.value === String.prototype.trim &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js
new file mode 100644
index 000000000..26bcb4ce4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-84",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "constructor");
+ if (desc.value === Boolean.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js
new file mode 100644
index 000000000..8f1d5acb8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-85",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "toString");
+ if (desc.value === Boolean.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js
new file mode 100644
index 000000000..cac262599
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-86",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.valueOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, "valueOf");
+ if (desc.value === Boolean.prototype.valueOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js
new file mode 100644
index 000000000..244d527f3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-88",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.constructor)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number.prototype, "constructor");
+ if (desc.value === Number.prototype.constructor &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js
new file mode 100644
index 000000000..d8e2bfe99
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-89",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toString");
+ if (desc.value === Number.prototype.toString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js
new file mode 100644
index 000000000..7f03a3b9d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-9",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.decodeURI)",
+
+test: function testcase() {
+ var global = fnGlobalObject();
+ var desc = Object.getOwnPropertyDescriptor(global, "decodeURI");
+ if (desc.value === global.decodeURI &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js
new file mode 100644
index 000000000..75f36649c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-90",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toLocaleString)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toLocaleString");
+ if (desc.value === Number.prototype.toLocaleString &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js
new file mode 100644
index 000000000..e5303550d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-91",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toFixed)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toFixed");
+ if (desc.value === Number.prototype.toFixed &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js
new file mode 100644
index 000000000..ddb9341e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-92",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toExponential)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toExponential");
+ if (desc.value === Number.prototype.toExponential &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js
new file mode 100644
index 000000000..cc0c2d52c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-93",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toPrecision)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number.prototype, "toPrecision");
+ if (desc.value === Number.prototype.toPrecision &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js
new file mode 100644
index 000000000..de43a9de2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-94",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.valueOf)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Number.prototype, "valueOf");
+ if (desc.value === Number.prototype.valueOf &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js
new file mode 100644
index 000000000..1a7a9c50b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-96",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.abs)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "abs");
+ if (desc.value === Math.abs &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js
new file mode 100644
index 000000000..fcab26209
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-97",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.acos)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "acos");
+ if (desc.value === Math.acos &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js
new file mode 100644
index 000000000..f3e129a00
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-98",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.asin)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "asin");
+ if (desc.value === Math.asin &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js
new file mode 100644
index 000000000..a1ed030dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.3-4-99",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js",
+
+description: "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.atan)",
+
+test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Math, "atan");
+ if (desc.value === Math.atan &&
+ desc.writable === true &&
+ desc.enumerable === false &&
+ desc.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js
new file mode 100644
index 000000000..2b946256d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.4-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js",
+
+description: "Object.getOwnPropertyNames must exist as a function",
+
+test: function testcase() {
+ if (typeof(Object.getOwnPropertyNames) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js
new file mode 100644
index 000000000..ae480ef1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.4-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js",
+
+description: "Object.getOwnPropertyNames must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.getOwnPropertyNames.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js
new file mode 100644
index 000000000..ad408b4ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-1-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js",
+
+ description: "Object.getOwnPropertyNames throws TypeError if 'O' is undefined",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyNames(undefined);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js
new file mode 100644
index 000000000..6fb0405aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-1-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js",
+
+ description: "Object.getOwnPropertyNames throws TypeError if 'O' is null",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyNames(null);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js
new file mode 100644
index 000000000..693d7f87b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-1-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js",
+
+ description: "Object.getOwnPropertyNames throws TypeError if 'O' is a boolean",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyNames(true);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js
new file mode 100644
index 000000000..f5a031758
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.4-1-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js",
+
+ description: "Object.getOwnPropertyNames throws TypeError if 'O' is a string",
+
+ test: function testcase() {
+ try {
+ Object.getOwnPropertyNames("abc");
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js
new file mode 100644
index 000000000..5c014ee32
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.4-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js",
+
+description: "Object.getOwnPropertyNames throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.getOwnPropertyNames(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js
new file mode 100644
index 000000000..88e83a54c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-2-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js",
+
+ description: "Object.getOwnPropertyNames - returned array is an array according to Array.isArray",
+
+ test: function testcase() {
+
+ var obj = {};
+ var result = Object.getOwnPropertyNames(obj);
+
+ return Array.isArray(result);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js
new file mode 100644
index 000000000..144947b6f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-2-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js",
+
+ description: "Object.getOwnPropertyNames - returned array is an instance of Array",
+
+ test: function testcase() {
+ var obj = {};
+ var result = Object.getOwnPropertyNames(obj);
+
+ return result instanceof Array;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js
new file mode 100644
index 000000000..7efae96a0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-2-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js",
+
+ description: "Object.getOwnPropertyNames - length of returned array is initialized to 0",
+
+ test: function testcase() {
+
+ var obj = {};
+ var result = Object.getOwnPropertyNames(obj);
+
+ return result.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js
new file mode 100644
index 000000000..ff16c4dc2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-2-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js",
+
+ description: "Object.getOwnPropertyNames - returned array is the standard built-in constructor",
+
+ test: function testcase() {
+ var oldArray = Array;
+ Array = function () {
+ throw new Error("invoke customer defined Array!");
+ };
+
+ var obj = {};
+ try {
+ var result = Object.getOwnPropertyNames(obj);
+ return Object.prototype.toString.call(result) === "[object Array]";
+ } catch (ex) {
+ return false;
+ } finally {
+ Array = oldArray;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js
new file mode 100644
index 000000000..392ba3740
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-3-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js",
+
+ description: "Object.getOwnPropertyNames - elements of the returned array start from index 0",
+
+ test: function testcase() {
+ var obj = { prop1: 1001 };
+
+ var arr = Object.getOwnPropertyNames(obj);
+
+ return arr.hasOwnProperty(0) && arr[0] === "prop1";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js
new file mode 100644
index 000000000..a05cb121f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.4-4-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js",
+
+description: "Object.getOwnPropertyNames returns array of property names (Object)",
+
+test: function testcase() {
+ var result = Object.getOwnPropertyNames(Object);
+ var expResult = ["getPrototypeOf", "getOwnPropertyDescriptor", "getOwnPropertyNames", "create", "defineProperty", "defineProperties", "seal", "freeze", "preventExtensions", "isSealed", "isFrozen", "isExtensible", "keys", "prototype", "length"];
+ var found;
+
+ return arrayContains(result, expResult);
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js
new file mode 100644
index 000000000..0056eb95a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-36",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js",
+
+ description: "Object.getOwnPropertyNames - inherited data properties are not pushed into the returned array",
+
+ test: function testcase() {
+
+ var proto = { "parent": "parent" };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ var result = Object.getOwnPropertyNames(child);
+
+ for (var p in result) {
+ if (result[p] === "parent") {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js
new file mode 100644
index 000000000..3f427f238
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-37",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js",
+
+ description: "Object.getOwnPropertyNames - inherited accessor properties are not pushed into the returned array",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "parent", {
+ get: function () {
+ return "parent";
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ var result = Object.getOwnPropertyNames(child);
+
+ for (var p in result) {
+ if (result[p] === "parent") {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js
new file mode 100644
index 000000000..97f59aa09
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-38",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js",
+
+ description: "Object.getOwnPropertyNames - own data properties are pushed into the returned array",
+
+ test: function testcase() {
+
+ var obj = { "a": "a" };
+
+ var result = Object.getOwnPropertyNames(obj);
+
+ return result[0] === "a";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js
new file mode 100644
index 000000000..a5aafc793
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-39",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js",
+
+ description: "Object.getOwnPropertyNames - own accessor properties are pushed into the returned array",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "a", {
+ get: function () {
+ return "a";
+ },
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(obj);
+
+ return result[0] === "a";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js
new file mode 100644
index 000000000..e8e582c25
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-40",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js",
+
+ description: "Object.getOwnPropertyNames - inherited data property of String object 'O' is not pushed into the returned array",
+
+ test: function testcase() {
+ try {
+ var str = new String("abc");
+
+ String.prototype.protoProperty = "protoString";
+
+ var result = Object.getOwnPropertyNames(str);
+
+ for (var p in result) {
+ if (result[p] === "protoProperty") {
+ return false;
+ }
+ }
+
+ return true;
+ } finally {
+ delete String.prototype.protoProperty;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js
new file mode 100644
index 000000000..47196686b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-41",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js",
+
+ description: "Object.getOwnPropertyNames - inherited accessor property of String object 'O' is not pushed into the returned array",
+
+ test: function testcase() {
+ try {
+ var str = new String("abc");
+
+ Object.defineProperty(String.prototype, "protoProperty", {
+ get: function () {
+ return "protoString";
+ },
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(str);
+
+ for (var p in result) {
+ if (result[p] === "protoProperty") {
+ return false;
+ }
+ }
+ return true;
+ } finally {
+ delete String.prototype.protoProperty;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js
new file mode 100644
index 000000000..1d10c0ef6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-42",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js",
+
+ description: "Object.getOwnPropertyNames - own data property of String object 'O' is pushed into the returned array",
+
+ test: function testcase() {
+ var str = new String("abc");
+
+ Object.defineProperty(str, "ownProperty", {
+ value: "ownString",
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(str);
+
+ for (var p in result) {
+ if (result[p] === "ownProperty") {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js
new file mode 100644
index 000000000..bce5785c4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.4-4-43",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js",
+
+ description: "Object.getOwnPropertyNames - own accessor property of String object 'O' is pushed into the returned array",
+
+ test: function testcase() {
+ var str = new String("abc");
+
+ Object.defineProperty(str, "ownProperty", {
+ get: function () {
+ return "ownString";
+ },
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(str);
+
+ for (var p in result) {
+ if (result[p] === "ownProperty") {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js
new file mode 100644
index 000000000..df2747bb5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-44",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js",
+
+ description: "Object.getOwnPropertyNames - own index properties of String object are pushed into the returned Array",
+
+ test: function testcase() {
+
+ var str = new String("abc");
+ str[5] = "de";
+
+ var expResult = ["0", "1", "2", "length", "5"];
+
+ var result = Object.getOwnPropertyNames(str);
+
+ return compareArray(expResult, result);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js
new file mode 100644
index 000000000..0f60161ec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-45",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js",
+
+ description: "Object.getOwnPropertyNames - inherited data property of Array object 'O' is not pushed into the returned array.",
+
+ test: function testcase() {
+ try {
+ var arr = [0, 1, 2];
+
+ Array.prototype.protoProperty = "protoArray";
+
+ var result = Object.getOwnPropertyNames(arr);
+
+ for (var p in result) {
+ if (result[p] === "protoProperty") {
+ return false;
+ }
+ }
+ return true;
+ } finally {
+ delete Array.prototype.protoProperty;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js
new file mode 100644
index 000000000..904727a87
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-46",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js",
+
+ description: "Object.getOwnPropertyNames - inherited accessor property of Array object 'O' is not pushed into the returned array.",
+
+ test: function testcase() {
+ try {
+ var arr = [0, 1, 2];
+
+ Object.defineProperty(Array.prototype, "protoProperty", {
+ get: function () {
+ return "protoArray";
+ },
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(arr);
+
+ for (var p in result) {
+ if (result[p] === "protoProperty") {
+ return false;
+ }
+ }
+ return true;
+ } finally {
+ delete Array.prototype.protoProperty;
+ }
+ },
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js
new file mode 100644
index 000000000..53f994e68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-47",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js",
+
+ description: "Object.getOwnPropertyNames - own data property of Array object 'O' is pushed into the returned array",
+
+ test: function testcase() {
+ var arr = [0, 1, 2];
+ arr.ownProperty = "ownArray";
+
+ var result = Object.getOwnPropertyNames(arr);
+
+ for (var p in result) {
+ if (result[p] === "ownProperty") {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js
new file mode 100644
index 000000000..45bd226ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-48",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js",
+
+ description: "Object.getOwnPropertyNames - own accessor property of Array object 'O' is pushed into the returned array.",
+
+ test: function testcase() {
+ var arr = [0, 1, 2];
+
+ Object.defineProperty(arr, "ownProperty", {
+ get: function () {
+ return "ownArray";
+ },
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(arr);
+
+ for (var p in result) {
+ if (result[p] === "ownProperty") {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js
new file mode 100644
index 000000000..f36fb401d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-49",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js",
+
+ description: "Object.getOwnPropertyNames - own index properties of Array objcect are pushed into the returned Array",
+
+ test: function testcase() {
+ var arr = [0, 1, 2];
+
+ var expResult = ["0", "1", "2", "length"];
+
+ var result = Object.getOwnPropertyNames(arr);
+
+ return compareArray(expResult, result);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js
new file mode 100644
index 000000000..6c2bc596b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-50",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js",
+
+ description: "Object.getOwnPropertyNames - non-enumerable own property of 'O' is pushed into the returned Array",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "nonEnumerableProp", {
+ value: 10,
+ enumerable: false,
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(obj);
+
+ return result[0] === "nonEnumerableProp";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js
new file mode 100644
index 000000000..95e8211f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.4-4-b-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js",
+
+description: "Object.getOwnPropertyNames - descriptor of resultant array is all true",
+
+test: function testcase() {
+ var obj = new Object();
+ obj.x = 1;
+ obj.y = 2;
+ var result = Object.getOwnPropertyNames(obj);
+ var desc = Object.getOwnPropertyDescriptor(result,"0");
+ if (desc.enumerable === true &&
+ desc.configurable === true &&
+ desc.writable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js
new file mode 100644
index 000000000..7ebe0f501
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-b-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js",
+
+ description: "Object.getOwnPropertyNames - all own properties are pushed into the returned array",
+
+ test: function testcase() {
+ var obj = { "a": "a" };
+
+ Object.defineProperty(obj, "b", {
+ get: function () {
+ return "b";
+ },
+ enumerable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "c", {
+ get: function () {
+ return "c";
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "d", {
+ value: "d",
+ enumerable: false,
+ configurable: true
+ });
+
+ var result = Object.getOwnPropertyNames(obj);
+ var expResult = ["a", "b", "c", "d"];
+
+ return compareArray(expResult, result);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js
new file mode 100644
index 000000000..f3258edbf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.4-4-b-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js",
+
+ description: "Object.getOwnPropertyNames - own property named empty('') is pushed into the returned array",
+
+ test: function testcase() {
+ var obj = { "": "empty" };
+
+ var result = Object.getOwnPropertyNames(obj);
+
+ for (var p in result) {
+ if (result[p] === "") {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js
new file mode 100644
index 000000000..24ed4cc71
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.4-4-b-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js",
+
+ description: "Object.getOwnPropertyNames - elements of the returned array are writable",
+
+ test: function testcase() {
+ var obj = { "a": "a" };
+
+ var result = Object.getOwnPropertyNames(obj);
+
+ try {
+ var beforeOverride = (result[0] === "a");
+ result[0] = "b";
+ var afterOverride = (result[0] === "b");
+
+ return beforeOverride && afterOverride;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js
new file mode 100644
index 000000000..48976edd1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.4-4-b-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js",
+
+ description: "Object.getOwnPropertyNames - elements of the returned array are enumerable",
+
+ test: function testcase() {
+ var obj = { "a": "a" };
+
+ var result = Object.getOwnPropertyNames(obj);
+
+ for (var p in result) {
+ if (result[p] === "a") {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js
new file mode 100644
index 000000000..e09fde1f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.4-4-b-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js",
+
+ description: "Object.getOwnPropertyNames - elements of the returned array are configurable",
+
+ test: function testcase() {
+ var obj = { "a": "a" };
+
+ var result = Object.getOwnPropertyNames(obj);
+
+ var beforeDeleted = (result.hasOwnProperty("0"));
+ delete result[0];
+ var afterDeleted = (result.hasOwnProperty("0"));
+
+ return beforeDeleted && !afterDeleted;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyNames);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js
new file mode 100644
index 000000000..52c9cd36b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js",
+
+description: "Object.create must exist as a function",
+
+test: function testcase() {
+ if (typeof(Object.create) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js
new file mode 100644
index 000000000..7290efa5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js",
+
+description: "Object.create must exist as a function taking 2 parameters",
+
+test: function testcase() {
+ if (Object.create.length === 2) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js
new file mode 100644
index 000000000..0064f2d35
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js",
+
+description: "Object.create throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.create(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js
new file mode 100644
index 000000000..9322aa829
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+create sets the [[Prototype]] of the created object to first parameter.
+This can be checked using isPrototypeOf, or getPrototypeOf.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-2-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js",
+
+description: "Object.create creates new Object",
+
+test: function testcase() {
+ function base() {}
+ var b = new base();
+ var prop = new Object();
+ var d = Object.create(b);
+
+ if (typeof d === 'object') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js
new file mode 100644
index 000000000..120200ec4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+create sets the [[Prototype]] of the created object to first parameter.
+This can be checked using isPrototypeOf, or getPrototypeOf.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-3-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js",
+
+description: "Object.create sets the prototype of the passed-in object",
+
+test: function testcase() {
+ function base() {}
+ var b = new base();
+ var d = Object.create(b);
+
+ if (Object.getPrototypeOf(d) === b &&
+ b.isPrototypeOf(d) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js
new file mode 100644
index 000000000..58820f656
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+create sets the [[Prototype]] of the created object to first parameter.
+This can be checked using isPrototypeOf, or getPrototypeOf.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.5-4-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js",
+
+description: "Object.create sets the prototype of the passed-in object and adds new properties",
+
+test: function testcase() {
+ function base() {}
+ var b = new base();
+ var prop = new Object();
+ var d = Object.create(b,{ "x": {value: true,writable: false},
+ "y": {value: "str",writable: false} });
+
+ if (Object.getPrototypeOf(d) === b &&
+ b.isPrototypeOf(d) === true &&
+ d.x === true &&
+ d.y === "str" &&
+ b.x === undefined &&
+ b.y === undefined) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.create) && fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js
new file mode 100644
index 000000000..8bd26d164
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js",
+
+description: "Object.defineProperty must exist as a function",
+
+test: function testcase() {
+ var f = Object.defineProperty;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js
new file mode 100644
index 000000000..10001bb26
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js",
+
+description: "Object.defineProperty must exist as a function taking 3 parameters",
+
+test: function testcase() {
+ if (Object.defineProperty.length === 3) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js
new file mode 100644
index 000000000..f651ea610
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-1-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js",
+
+ description: "Object.defineProperty applied to undefined throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(undefined, "foo", {});
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js
new file mode 100644
index 000000000..eb5362cde
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-1-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js",
+
+ description: "Object.defineProperty applied to null throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(null, "foo", {});
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js
new file mode 100644
index 000000000..96cd301a4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-1-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js",
+
+ description: "Object.defineProperty applied to number primitive throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(5, "foo", {});
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js
new file mode 100644
index 000000000..2a330c5c1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-1-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js",
+
+ description: "Object.defineProperty applied to string primitive throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty("hello\nworld\\!", "foo", {});
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js
new file mode 100644
index 000000000..f1126b514
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js",
+
+description: "Object.defineProperty throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.defineProperty(true, "foo", {});
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js
new file mode 100644
index 000000000..e52a38460
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js",
+
+ description: "Object.defineProperty - argument 'P' is undefined that converts to string 'undefined'",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, undefined, {});
+
+ return obj.hasOwnProperty("undefined");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js
new file mode 100644
index 000000000..68b560f0d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is a negative number)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, -20, {});
+
+ return obj.hasOwnProperty("-20");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js
new file mode 100644
index 000000000..0fc48a097
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-11",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is Infinity)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, Infinity, {});
+
+ return obj.hasOwnProperty("Infinity");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js
new file mode 100644
index 000000000..8856b9ba4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-12",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is +Infinity)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, +Infinity, {});
+
+ return obj.hasOwnProperty("Infinity");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js
new file mode 100644
index 000000000..795f3e54b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-13",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is -Infinity)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, -Infinity, {});
+
+ return obj.hasOwnProperty("-Infinity");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js
new file mode 100644
index 000000000..3042486f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-14",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 20 zeros))",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 100000000000000000000, {});
+
+ return obj.hasOwnProperty("100000000000000000000");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js
new file mode 100644
index 000000000..ba6df0470
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-15",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 21 zeros))",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1000000000000000000000, {});
+
+ return obj.hasOwnProperty("1e+21");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js
new file mode 100644
index 000000000..90aca6489
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-16",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 22 zeros))",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 10000000000000000000000, {});
+
+ return obj.hasOwnProperty("1e+22");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js
new file mode 100644
index 000000000..ee7fd3c41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-17-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(trailing 5 zeros))",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 000001, {});
+
+ return obj.hasOwnProperty("1");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js
new file mode 100644
index 000000000..b40480b96
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-17",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e+20)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1e+20, {});
+
+ return obj.hasOwnProperty("100000000000000000000");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js
new file mode 100644
index 000000000..42f97e61b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-18",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to string (value is 1e+21)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1e+21, {});
+
+ return obj.hasOwnProperty("1e+21");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js
new file mode 100644
index 000000000..02b8937e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-19",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to string (value is 1e+22)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1e+22, {});
+
+ return obj.hasOwnProperty("1e+22");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js
new file mode 100644
index 000000000..7ba9c5e0d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js",
+
+ description: "Object.defineProperty - argument 'P' is null that converts to string 'null'",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, null, {});
+
+ return obj.hasOwnProperty("null");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js
new file mode 100644
index 000000000..63dcddc47
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-20",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.000001)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 0.000001, {});
+
+ return obj.hasOwnProperty("0.000001");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js
new file mode 100644
index 000000000..606fab120
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-21",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.0000001)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 0.0000001, {});
+
+ return obj.hasOwnProperty("1e-7");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js
new file mode 100644
index 000000000..95ba942ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-22",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.00000001)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 0.00000001, {});
+
+ return obj.hasOwnProperty("1e-8");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js
new file mode 100644
index 000000000..a0c38f006
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-23",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-7)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1e-7, {});
+
+ return obj.hasOwnProperty("1e-7");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js
new file mode 100644
index 000000000..e6ed1629d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-24",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-6)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1e-6, {});
+
+ return obj.hasOwnProperty("0.000001");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js
new file mode 100644
index 000000000..11da3205b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-25",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-5)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1e-5, {});
+
+ return obj.hasOwnProperty("0.00001");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js
new file mode 100644
index 000000000..c6796fce4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-26",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js",
+
+ description: "Object.defineProperty - argument 'P' is an integer that converts to a string (value is 123)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 123, {});
+
+ return obj.hasOwnProperty("123");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js
new file mode 100644
index 000000000..718abd30a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-27",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js",
+
+ description: "Object.defineProperty - argument 'P' is a decimal that converts to a string (value is 123.456)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 123.456, {});
+
+ return obj.hasOwnProperty("123.456");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js
new file mode 100644
index 000000000..f31e34ee4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-28",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 19 zeros).1)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 10000000000000000000.1, {});
+
+ return obj.hasOwnProperty("10000000000000000000");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js
new file mode 100644
index 000000000..5aaae527f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-29",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 20 zeros).1)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 100000000000000000000.1, {});
+
+ return obj.hasOwnProperty("100000000000000000000");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js
new file mode 100644
index 000000000..683a48243
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js",
+
+ description: "Object.defineProperty - argument 'P' is a boolean whose value is false",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, false, {});
+
+ return obj.hasOwnProperty("false");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js
new file mode 100644
index 000000000..c05c202e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-30",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 21 zeros).1)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 1000000000000000000000.1, {});
+
+ return obj.hasOwnProperty("1e+21");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js
new file mode 100644
index 000000000..2258a48f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-31",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 22 zeros).1)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 10000000000000000000000.1, {});
+
+ return obj.hasOwnProperty("1e+22");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js
new file mode 100644
index 000000000..dee573cf2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-32",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 123.1234567)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 123.1234567, {});
+
+ return obj.hasOwnProperty("123.1234567");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js
new file mode 100644
index 000000000..50b850026
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-33",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js",
+
+ description: "Object.defineProperty - argument 'P' is applied to an empty string ",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "", {});
+
+ return obj.hasOwnProperty("");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js
new file mode 100644
index 000000000..e2e7d369e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-34",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js",
+
+ description: "Object.defineProperty - argument 'P' is applied to string 'AB\n\\cd' ",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "AB\n\\cd", {});
+
+ return obj.hasOwnProperty("AB\n\\cd");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js
new file mode 100644
index 000000000..5d6cfddc9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-35",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js",
+
+ description: "Object.defineProperty - argument 'P' is applied to string 'undefined' ",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "undefined", {});
+
+ return obj.hasOwnProperty("undefined");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js
new file mode 100644
index 000000000..a946abca8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-36",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js",
+
+ description: "Object.defineProperty - argument 'P' is applied to string 'null' ",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "null", {});
+
+ return obj.hasOwnProperty("null");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js
new file mode 100644
index 000000000..f3aee8606
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-37",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js",
+
+ description: "Object.defineProperty - argument 'P' is applied to string '123αβπcd' ",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "123αβπcd", {});
+
+ return obj.hasOwnProperty("123αβπcd");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js
new file mode 100644
index 000000000..03c374d3c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-38",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js",
+
+ description: "Object.defineProperty - argument 'P' is applied to string '1' ",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "1", {});
+
+ return obj.hasOwnProperty("1");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js
new file mode 100644
index 000000000..bbb06dcaf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-39",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js",
+
+ description: "Object.defineProperty - argument 'P' is an array that converts to a string",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, [1, 2], {});
+
+ return obj.hasOwnProperty("1,2");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js
new file mode 100644
index 000000000..b61c2b1db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js",
+
+ description: "Object.defineProperty - argument 'P' is a boolean whose value is true",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, true, {});
+
+ return obj.hasOwnProperty("true");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js
new file mode 100644
index 000000000..33ecd58fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-40",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js",
+
+ description: "Object.defineProperty - argument 'P' is a String Object that converts to a string",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, new String("Hello"), {});
+
+ return obj.hasOwnProperty("Hello");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js
new file mode 100644
index 000000000..8cd555b38
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-41",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js",
+
+ description: "Object.defineProperty - argument 'P' is a Boolean Object that converts to a string",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, new Boolean(false), {});
+
+ return obj.hasOwnProperty("false");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js
new file mode 100644
index 000000000..ee2380a6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-42",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js",
+
+ description: "Object.defineProperty - argument 'P' is a Number Object that converts to a string",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, new Number(123), {});
+
+ return obj.hasOwnProperty("123");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js
new file mode 100644
index 000000000..2b3782c5d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-43",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js",
+
+ description: "Object.defineProperty - argument 'P' is an object that has an own toString method",
+
+ test: function testcase() {
+ var obj = {};
+
+ var ownProp = {
+ toString: function () {
+ return "abc";
+ }
+ };
+
+ Object.defineProperty(obj, ownProp, {});
+
+ return obj.hasOwnProperty("abc");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js
new file mode 100644
index 000000000..13b983471
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-44",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js",
+
+ description: "Object.defineProperty - argument 'P' is an object that has an own valueOf method",
+
+ test: function testcase() {
+ var obj = {};
+
+ var ownProp = {
+ valueOf: function () {
+ return "abc";
+ },
+ toString: undefined
+ };
+
+ Object.defineProperty(obj, ownProp, {});
+
+ return obj.hasOwnProperty("abc");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js
new file mode 100644
index 000000000..7035dc103
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-45",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js",
+
+ description: "Object.defineProperty - argument 'P' is an object whose toString method returns an object and whose valueOf method returns a primitive value",
+
+ test: function testcase() {
+ var obj = {};
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var ownProp = {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return "abc";
+ }
+ };
+
+ Object.defineProperty(obj, ownProp, {});
+
+ return obj.hasOwnProperty("abc") && valueOfAccessed && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js
new file mode 100644
index 000000000..c90f27c4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-46",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js",
+
+ description: "Object.defineProperty - argument 'P' is an object that has an own toString and valueOf method",
+
+ test: function testcase() {
+ var obj = {};
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var ownProp = {
+ toString: function () {
+ toStringAccessed = true;
+ return "abc";
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return "prop";
+ }
+ };
+ Object.defineProperty(obj, ownProp, {});
+
+ return obj.hasOwnProperty("abc") && !valueOfAccessed && toStringAccessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js
new file mode 100644
index 000000000..8ede9fe46
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-47",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js",
+
+ description: "Object.defineProperty - TypeError exception is thrown when 'P' is an object that neither toString nor valueOf returns a primitive value",
+
+ test: function testcase() {
+ var obj = {};
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var ownProp = {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ };
+
+ try {
+ Object.defineProperty(obj, ownProp, {});
+ return false;
+ } catch (e) {
+ return valueOfAccessed && toStringAccessed && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js
new file mode 100644
index 000000000..8f936a66d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-48",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js",
+
+ description: "Object.defineProperty - an inherited toString method is invoked when 'P' is an object with an own valueOf and an inherited toString methods",
+
+ test: function testcase() {
+ var obj = {};
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var proto = {
+ toString: function () {
+ toStringAccessed = true;
+ return "test";
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ child.valueOf = function () {
+ valueOfAccessed = true;
+ return "10";
+ };
+
+ Object.defineProperty(obj, child, {});
+
+ return obj.hasOwnProperty("test") && !valueOfAccessed && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js
new file mode 100644
index 000000000..fb136063a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js
@@ -0,0 +1,40 @@
+ /// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is NaN)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, NaN, {});
+
+ return obj.hasOwnProperty("NaN");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js
new file mode 100644
index 000000000..88c407536
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 0, {});
+
+ return obj.hasOwnProperty("0");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js
new file mode 100644
index 000000000..d7087927f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-7",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is +0)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, +0, {});
+
+ return obj.hasOwnProperty("0");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js
new file mode 100644
index 000000000..2faa6ed43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is -0)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, -0, {});
+
+ return obj.hasOwnProperty("0");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js
new file mode 100644
index 000000000..af68c30f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-2-9",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js",
+
+ description: "Object.defineProperty - argument 'P' is a number that converts to a string (value is a positive number)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, 30, {});
+
+ return obj.hasOwnProperty("30");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js
new file mode 100644
index 000000000..bcc7c4890
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js",
+
+description: "Object.defineProperty throws TypeError if desc has 'get' and 'value' present(8.10.5 step 9.a)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = function () { return 1; }
+ var desc = { get: getter, value: 101};
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js
new file mode 100644
index 000000000..70547e537
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-10",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js",
+
+description: "Object.defineProperty throws TypeError if setter is not callable but not undefined (Number)(8.10.5 step 8.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy setter
+ var setter = 42;
+ var desc = { set: setter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js
new file mode 100644
index 000000000..411aa437d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-100",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is null (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { configurable: null });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js
new file mode 100644
index 000000000..28f06d6d2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-101",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is true (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: true });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js
new file mode 100644
index 000000000..bc4019eee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-102",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is false (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { configurable: false });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js
new file mode 100644
index 000000000..6cf5f8452
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-103",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is 0 (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { configurable: 0 });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js
new file mode 100644
index 000000000..f60c1fe4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-104",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is +0 (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: +0 });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js
new file mode 100644
index 000000000..cf87ece44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-105",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is -0 (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { configurable: -0 });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js
new file mode 100644
index 000000000..9fea1decf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-106",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is NaN (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { configurable: NaN });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js
new file mode 100644
index 000000000..bb5b3b6d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-107",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a positive number (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: 12345 });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js
new file mode 100644
index 000000000..d6dd3b105
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-108",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a negative number (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: -12345 });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js
new file mode 100644
index 000000000..ccb08a1f9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-109",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is an empty string (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { configurable: "" });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js
new file mode 100644
index 000000000..d7fadd165
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-11",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js",
+
+description: "Object.defineProperty throws TypeError if setter is not callable but not undefined (Boolean)(8.10.5 step 8.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy setter
+ var setter = true;
+ var desc = { set: setter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js
new file mode 100644
index 000000000..e7127de4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-110",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a non-empty string (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: " " });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js
new file mode 100644
index 000000000..e7176c128
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-111",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a Function object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ configurable: function () { }
+ });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js
new file mode 100644
index 000000000..2a187ce62
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-112",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is an Array object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: [1, 2, 3] });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js
new file mode 100644
index 000000000..61d005565
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-113",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a String object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: new String("bbq") });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js
new file mode 100644
index 000000000..776b12808
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-114",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a Boolean object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: new Boolean(true) });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js
new file mode 100644
index 000000000..e9bd2d1c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-115",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a Number object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: new Number(0) });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js
new file mode 100644
index 000000000..a049abdfd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-116",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is the Math object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: Math });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js
new file mode 100644
index 000000000..eb681d2b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-117",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a Date object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { configurable: new Date() });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js
new file mode 100644
index 000000000..8a869d0d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-118",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a RegExp object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ configurable: new RegExp()
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js
new file mode 100644
index 000000000..114e7b42d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-119",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is the JSON object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ configurable: JSON
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js
new file mode 100644
index 000000000..2c7dd879a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-12",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js",
+
+description: "Object.defineProperty throws TypeError if setter is not callable but not undefined (String)(8.10.5 step 8.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy setter
+ var setter = "abc";
+ var desc = { set: setter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js
new file mode 100644
index 000000000..51400c933
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-120",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is a Error object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ configurable: new SyntaxError()
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js
new file mode 100644
index 000000000..3dacf52a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-121",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is the Argument object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var argObj = (function () { return arguments; })(1, true, "a");
+
+ var attr = {
+ configurable: argObj
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-122.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-122.js
new file mode 100644
index 000000000..3cf319016
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-122.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-122",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-122.js",
+
+ description: "Object.defineProperty -'configurable' property in 'Attributes' is the document host object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ configurable : document
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js
new file mode 100644
index 000000000..5a5aa184b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-123",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is the window host object (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ configurable: window
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js
new file mode 100644
index 000000000..5fc3618f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-124",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is treated as true when it is a string (value is 'false') (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ configurable: "false"
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js
new file mode 100644
index 000000000..2a54d7695
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-125",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is treated as true when it is new Boolean(false) (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ configurable: new Boolean(false)
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js
new file mode 100644
index 000000000..495ce489b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-126",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is present (8.10.5 step 5)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = { value: 100 };
+
+ Object.defineProperty(obj, "property", attr);
+
+ return obj.property === 100;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js
new file mode 100644
index 000000000..9d6af97e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-127",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is not present (8.10.5 step 5)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var attr = {
+ writable: true
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js
new file mode 100644
index 000000000..44f3e302e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-129",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is an inherited data property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {
+ value: "inheritedDataProperty"
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "inheritedDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js
new file mode 100644
index 000000000..2c05a1772
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-13",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js",
+
+description: "Object.defineProperty throws TypeError if the setter in desc is not callable (Null)(8.10.5 step 8.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy setter
+ var setter = null;
+ var desc = { set: setter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js
new file mode 100644
index 000000000..3243c009e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-130",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = { value: "inheritedDataProperty" };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ child.value = "ownDataProperty";
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js
new file mode 100644
index 000000000..532425db1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-131",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {};
+
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "value", {
+ value: "ownDataProperty"
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js
new file mode 100644
index 000000000..06dedc882
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-132",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is own accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var attr = {};
+ Object.defineProperty(attr, "value", {
+ get: function () {
+ return "ownAccessorProperty";
+ }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ return obj.property === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js
new file mode 100644
index 000000000..c94aab5f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-133",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {};
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "inheritedAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js
new file mode 100644
index 000000000..647762b27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-134",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {
+ value: "inheritedDataProperty"
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "value", {
+ get: function () {
+ return "ownAccessorProperty";
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js
new file mode 100644
index 000000000..38cf88fca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-135",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "value", {
+ get: function () {
+ return "ownAccessorProperty";
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js
new file mode 100644
index 000000000..5340aba8e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-136",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is own accessor property without a get function (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {};
+ Object.defineProperty(attr, "value", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js
new file mode 100644
index 000000000..571ff503c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-137",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {};
+ Object.defineProperty(proto, "value", {
+ get: function () {
+ return "inheritedAccessorProperty";
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "value", {
+ set : function () { }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js
new file mode 100644
index 000000000..7ea7c941c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-138",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js",
+
+ description: "Object.defineProperty - 'value' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { property : 120 };
+
+ var proto = {};
+ Object.defineProperty(proto, "value", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js
new file mode 100644
index 000000000..4b0d1d273
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-139-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Function.prototype.value = "Function";
+ var funObj = function (a, b) {
+ return a + b;
+ };
+
+ Object.defineProperty(obj, "property", funObj);
+
+ return obj.property === "Function";
+ } finally {
+ delete Function.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js
new file mode 100644
index 000000000..cd52a6a2e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-139",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var funObj = function (a, b) {
+ return a + b;
+ };
+
+ funObj.value = "Function";
+
+ Object.defineProperty(obj, "property", funObj);
+
+ return obj.property === "Function";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js
new file mode 100644
index 000000000..80db7eabb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-14",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js",
+
+description: "Object.defineProperty throws TypeError if setter is not callable but not undefined (Object)(8.10.5 step 8.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var setter = { a: 1 };
+ var desc = { set: setter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js
new file mode 100644
index 000000000..55e91aee7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-140-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Array.prototype.value = "Array";
+ var arrObj = [1, 2, 3];
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ return obj.property === "Array";
+ } finally {
+ delete Array.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js
new file mode 100644
index 000000000..450a1740a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-140",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var arrObj = [1, 2, 3];
+
+ arrObj.value = "Array";
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ return obj.property === "Array";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js
new file mode 100644
index 000000000..1a0d6dbbe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-141-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ String.prototype.value = "String";
+ var strObj = new String("abc");
+
+ Object.defineProperty(obj, "property", strObj);
+
+ return obj.property === "String";
+ } finally {
+ delete String.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js
new file mode 100644
index 000000000..f5e5eff9d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-141",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var strObj = new String("abc");
+
+ strObj.value = "String";
+
+ Object.defineProperty(obj, "property", strObj);
+
+ return obj.property === "String";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js
new file mode 100644
index 000000000..913e1a296
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-142-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Boolean.prototype.value = "Boolean";
+ var boolObj = new Boolean(true);
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ return obj.property === "Boolean";
+ } finally {
+ delete Boolean.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js
new file mode 100644
index 000000000..afdf17821
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-142",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var boolObj = new Boolean(true);
+
+ boolObj.value = "Boolean";
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ return obj.property === "Boolean";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js
new file mode 100644
index 000000000..0b526d086
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-143-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Number.prototype.value = "Number";
+ var numObj = new Number(-2);
+
+ Object.defineProperty(obj, "property", numObj);
+
+ return obj.property === "Number";
+ } finally {
+ delete Number.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js
new file mode 100644
index 000000000..bd98c61fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-143",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var numObj = new Number(-2);
+
+ numObj.value = "Number";
+
+ Object.defineProperty(obj, "property", numObj);
+
+ return obj.property === "Number";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js
new file mode 100644
index 000000000..11f253ae8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-144-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.value = "Math";
+
+ Object.defineProperty(obj, "property", Math);
+
+ return obj.property === "Math";
+ } finally {
+ delete Object.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js
new file mode 100644
index 000000000..47acabed0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-144",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Math.value = "Math";
+
+ Object.defineProperty(obj, "property", Math);
+
+ return obj.property === "Math";
+ } finally {
+ delete Math.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js
new file mode 100644
index 000000000..512ff99ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-145-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Date.prototype.value = "Date";
+ var dateObj = new Date();
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ return obj.property === "Date";
+ } finally {
+ delete Date.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js
new file mode 100644
index 000000000..64c3b92bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-145",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var dateObj = new Date();
+
+ dateObj.value = "Date";
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ return obj.property === "Date";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js
new file mode 100644
index 000000000..5028595ed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-146-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ RegExp.prototype.value = "RegExp";
+ var regObj = new RegExp();
+
+ Object.defineProperty(obj, "property", regObj);
+
+ return obj.property === "RegExp";
+ } finally {
+ delete RegExp.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js
new file mode 100644
index 000000000..2e062383f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-146",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var regObj = new RegExp();
+
+ regObj.value = "RegExp";
+
+ Object.defineProperty(obj, "property", regObj);
+
+ return obj.property === "RegExp";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js
new file mode 100644
index 000000000..55fea7ae9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-147-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.value = "JSON";
+
+ Object.defineProperty(obj, "property", JSON);
+
+ return obj.property === "JSON";
+ } finally {
+ delete Object.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js
new file mode 100644
index 000000000..662ac068b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-147",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ JSON.value = "JSON";
+
+ Object.defineProperty(obj, "property", JSON);
+
+ return obj.property === "JSON";
+ } finally {
+ delete JSON.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js
new file mode 100644
index 000000000..d9b5509f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-148-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Error.prototype.value = "Error";
+ var errObj = new Error();
+
+ Object.defineProperty(obj, "property", errObj);
+
+ return obj.property === "Error";
+ } finally {
+ delete Error.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js
new file mode 100644
index 000000000..bc107710c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-148",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var errObj = new Error();
+
+ errObj.value = "Error";
+
+ Object.defineProperty(obj, "property", errObj);
+
+ return obj.property === "Error";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js
new file mode 100644
index 000000000..e888f53ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-149-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Object.prototype.value = "arguments";
+ var argObj = (function () { return arguments; })();
+
+
+ Object.defineProperty(obj, "property", argObj);
+
+ return obj.property === "arguments";
+ } finally {
+ delete Object.prototype.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js
new file mode 100644
index 000000000..9c515fdb4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-149",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.value = "arguments";
+
+ Object.defineProperty(obj, "property", argObj);
+
+ return obj.property === "arguments";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js
new file mode 100644
index 000000000..8d855d011
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-15",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js",
+
+ description: "Object.defineProperty - 'Attributes' is undefined (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ try {
+ Object.defineProperty(obj, "property", undefined);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-150.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-150.js
new file mode 100644
index 000000000..009378805
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-150.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-150",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-150.js",
+
+ description: "Object.defineProperty - 'Attributes' is the document host object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ document.value = "document";
+
+ Object.defineProperty(obj, "property", document);
+
+ return obj.property === "document";
+ } finally {
+ delete document.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js
new file mode 100644
index 000000000..18b9b7202
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-151",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js",
+
+ description: "Object.defineProperty - 'Attributes' is the window host object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ window.value = "window";
+
+ Object.defineProperty(obj, "property", window);
+
+ return obj.property === "window";
+ } finally {
+ delete window.value;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js
new file mode 100644
index 000000000..ebfd57c57
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-152",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is present (8.10.5 step 6)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ writable: false
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js
new file mode 100644
index 000000000..faa5625de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-153",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is not present (8.10.5 step 6)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {
+ value: 100
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js
new file mode 100644
index 000000000..5c335ab06
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-154",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var attr = {
+ writable: true
+ };
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js
new file mode 100644
index 000000000..f10676d74
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-155",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is an inherited data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {
+ writable: true
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js
new file mode 100644
index 000000000..ac3a59aa1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-156",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {
+ writable: false
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ child.writable = true;
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js
new file mode 100644
index 000000000..8df5a1811
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-157",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = { };
+ Object.defineProperty(proto, "writable", {
+ get : function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "writable", {
+ value: true
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js
new file mode 100644
index 000000000..30df226ed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-158",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var attr = { };
+ Object.defineProperty(attr, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js
new file mode 100644
index 000000000..4d598e6d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-159",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js
new file mode 100644
index 000000000..d85d55eaf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-16",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js",
+
+ description: "Object.defineProperty - 'Attributes' is null (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.defineProperty({}, "property", null);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js
new file mode 100644
index 000000000..3b03539ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-160",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {
+ writable: false
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js
new file mode 100644
index 000000000..de34e069f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-161",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "writable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js
new file mode 100644
index 000000000..2437941a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-162",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attr = {};
+ Object.defineProperty(attr, "writable", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js
new file mode 100644
index 000000000..1783006a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-163",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "writable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "writable", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js
new file mode 100644
index 000000000..70afd0b45
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-164",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "writable", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js
new file mode 100644
index 000000000..4a9606a8d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-165-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Function.prototype.writable = true;
+ var funObj = function (a, b) {
+ return a + b;
+ };
+
+ Object.defineProperty(obj, "property", funObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Function.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js
new file mode 100644
index 000000000..088780455
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-165",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var funObj = function (a, b) {
+ return a + b;
+ };
+
+ funObj.writable = true;
+
+ Object.defineProperty(obj, "property", funObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js
new file mode 100644
index 000000000..b8b0550de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-166-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Array.prototype.writable = true;
+ var arrObj = [1, 2, 3];
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Array.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js
new file mode 100644
index 000000000..22166864b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-166",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var arrObj = [1, 2, 3];
+
+ arrObj.writable = true;
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js
new file mode 100644
index 000000000..4c0ea1168
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-167-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ String.prototype.writable = true;
+ var strObj = new String("abc");
+
+ Object.defineProperty(obj, "property", strObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete String.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js
new file mode 100644
index 000000000..3a9b8c3a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-167",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var strObj = new String("abc");
+
+ strObj.writable = true;
+
+ Object.defineProperty(obj, "property", strObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js
new file mode 100644
index 000000000..54f366e71
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-168-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Boolean.prototype.writable = true;
+ var boolObj = new Boolean(true);
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Boolean.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js
new file mode 100644
index 000000000..58a560314
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-168",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var boolObj = new Boolean(true);
+
+ boolObj.writable = true;
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js
new file mode 100644
index 000000000..473e10680
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-169-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Number.prototype.writable = true;
+ var numObj = new Number(-2);
+
+ Object.defineProperty(obj, "property", numObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Number.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js
new file mode 100644
index 000000000..03384c4c1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-169",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var numObj = new Number(-2);
+
+ numObj.writable = true;
+
+ Object.defineProperty(obj, "property", numObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js
new file mode 100644
index 000000000..4c9d70fa6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-17",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js",
+
+ description: "Object.defineProperty - 'Attributes' is a boolean primitive (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.defineProperty({}, "property", true);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js
new file mode 100644
index 000000000..aee358e3d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-170-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.writable = true;
+
+ Object.defineProperty(obj, "property", Math);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Object.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js
new file mode 100644
index 000000000..e0cc7fdbb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-170",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Math.writable = true;
+
+ Object.defineProperty(obj, "property", Math);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Math.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js
new file mode 100644
index 000000000..4d46972bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-171-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Date.prototype.writable = true;
+
+ dateObj = new Date();
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Date.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js
new file mode 100644
index 000000000..f444128c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-171",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var dateObj = new Date();
+
+ dateObj.writable = true;
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js
new file mode 100644
index 000000000..8b5b7f679
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-172-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ RegExp.prototype.writable = true;
+
+ var regObj = new RegExp();
+
+ Object.defineProperty(obj, "property", regObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete RegExp.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js
new file mode 100644
index 000000000..1db4562c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-172",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var regObj = new RegExp();
+
+ regObj.writable = true;
+
+ Object.defineProperty(obj, "property", regObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js
new file mode 100644
index 000000000..fff148ebe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-173-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.writable = true;
+
+ Object.defineProperty(obj, "property", JSON);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Object.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js
new file mode 100644
index 000000000..cfadc615e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-173",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ JSON.writable = true;
+
+ Object.defineProperty(obj, "property", JSON);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete JSON.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js
new file mode 100644
index 000000000..3b77497b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-174-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Error.prototype.writable = true;
+
+ var errObj = new Error();
+
+ Object.defineProperty(obj, "property", errObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Error.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js
new file mode 100644
index 000000000..767c83b70
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-174",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var errObj = new Error();
+
+ errObj.writable = true;
+
+ Object.defineProperty(obj, "property", errObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js
new file mode 100644
index 000000000..09d300709
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-175-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Object.prototype.writable = true;
+
+ var argObj = (function () { return arguments; })();
+
+ Object.defineProperty(obj, "property", argObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete Object.prototype.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js
new file mode 100644
index 000000000..6ccf03327
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-175",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.writable = true;
+
+ Object.defineProperty(obj, "property", argObj);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-176.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-176.js
new file mode 100644
index 000000000..d1d8614b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-176.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-176",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-176.js",
+
+ description: "Object.defineProperty - 'Attributes' is the document host object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ document.writable = true;
+
+ Object.defineProperty(obj, "property", document);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete document.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js
new file mode 100644
index 000000000..8e88339a0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-177",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js",
+
+ description: "Object.defineProperty - 'Attributes' is the window host object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ window.writable = true;
+
+ Object.defineProperty(obj, "property", window);
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ } finally {
+ delete window.writable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js
new file mode 100644
index 000000000..c3abc7192
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-178",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is undefined (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ writable: undefined
+ });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js
new file mode 100644
index 000000000..abaf5d626
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-179",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is null (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { writable: null });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js
new file mode 100644
index 000000000..08c39414e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-18",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js",
+
+ description: "Object.defineProperty - 'Attributes' is a number primitive (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.defineProperty({}, "property", 12);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js
new file mode 100644
index 000000000..f0622c991
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-180",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is true (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: true });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js
new file mode 100644
index 000000000..027124fde
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-181",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is false (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { writable: false });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js
new file mode 100644
index 000000000..8c1ba7b0a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-182",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is 0 (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { writable: 0 });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js
new file mode 100644
index 000000000..f4fcaaf76
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-183",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is +0 (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: +0 });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js
new file mode 100644
index 000000000..869804956
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-184",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is -0 (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { writable: -0 });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js
new file mode 100644
index 000000000..e88a18574
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-185",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is NaN (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { writable: NaN});
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js
new file mode 100644
index 000000000..ae4819d6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-186",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a positive number (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: 12345 });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js
new file mode 100644
index 000000000..74864fdf6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-187",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a negative number (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: -12345 });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js
new file mode 100644
index 000000000..704953c87
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-188",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is an empty string (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: "" });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (typeof (obj.property) === "undefined");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js
new file mode 100644
index 000000000..ab616527b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-189",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a non-empty string (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: " " });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js
new file mode 100644
index 000000000..725b87d29
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-19",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js",
+
+ description: "Object.defineProperty - 'Attributes' is a string primitive (8.10.5 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.defineProperty({}, "property", "abc");
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js
new file mode 100644
index 000000000..b38f1db7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-190",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a Function object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ writable: function () { }
+ });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js
new file mode 100644
index 000000000..c96944255
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-191",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is an Array object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: [1, 2, 3] });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js
new file mode 100644
index 000000000..4c767b4cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-192",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a String object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: new String("bbq") });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js
new file mode 100644
index 000000000..b19d3e2c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-193",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a Boolean object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: new Boolean(true) });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js
new file mode 100644
index 000000000..3278ffcc2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-194",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a Number object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: new Number(123) });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js
new file mode 100644
index 000000000..7a2e45a19
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-195",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is the Math object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: Math });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js
new file mode 100644
index 000000000..88f0bd4b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-196",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a Date object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: new Date() });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js
new file mode 100644
index 000000000..ea8bb8649
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-197",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a RegExp object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ writable: new RegExp()
+ });
+
+ var beforeWrite = obj.hasOwnProperty("property") && typeof obj.property === "undefined";
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite && afterWrite;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js
new file mode 100644
index 000000000..f14c27480
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-198",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is the JSON object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: JSON });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js
new file mode 100644
index 000000000..e3f6cd79c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-199",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is a Error object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: new SyntaxError() });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js
new file mode 100644
index 000000000..5abe89418
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js",
+
+description: "Object.defineProperty throws TypeError if desc has 'get' and 'writable' present(8.10.5 step 9.a)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = function () { return 1; }
+ var desc = { get: getter, writable: false };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js
new file mode 100644
index 000000000..f9e8d91ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-20",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is present (8.10.5 step 3)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var accessed = false;
+ Object.defineProperty(obj, "property", {
+ enumerable: false
+ });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed && obj.hasOwnProperty("property");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js
new file mode 100644
index 000000000..20541896d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-200",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is the Argument object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var argObj = (function () { return arguments; })(1, true, "a");
+
+ Object.defineProperty(obj, "property", { writable: argObj });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-201.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-201.js
new file mode 100644
index 000000000..01f9c2a4c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-201.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-201",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-201.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is the document host object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: document });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js
new file mode 100644
index 000000000..dd68aecad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-202",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is the window host object (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ writable: window
+ });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js
new file mode 100644
index 000000000..cd55de2b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-203",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is treated as true when it is a string(value is 'false') (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: "false" });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js
new file mode 100644
index 000000000..e13a15e7b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-204",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js",
+
+ description: "Object.defineProperty - 'writable' property in 'Attributes' is treated as true when it is new Boolean(false) (8.10.5 step 6.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", { writable: new Boolean(false) });
+
+ var beforeWrite = obj.hasOwnProperty("property");
+
+ obj.property = "isWritable";
+
+ var afterWrite = (obj.property === "isWritable");
+
+ return beforeWrite === true && afterWrite === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js
new file mode 100644
index 000000000..7a8a984f8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-205",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is present (8.10.5 step 7)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return "present";
+ }
+ });
+
+ return obj.property === "present";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js
new file mode 100644
index 000000000..fe5631387
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-206",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is not present (8.10.5 step 7)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ set: function () {}
+ });
+
+ return typeof obj.property === "undefined" && obj.hasOwnProperty("property");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js
new file mode 100644
index 000000000..22b70f837
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-207",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var attributes = {
+ get: function () {
+ return "ownDataProperty";
+ }
+ };
+
+ Object.defineProperty(obj, "property", attributes);
+
+ return obj.property === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js
new file mode 100644
index 000000000..44df5af44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-208",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is an inherited data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {
+ get: function () {
+ return "inheritedDataProperty";
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "inheritedDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js
new file mode 100644
index 000000000..7a7bcf2c2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-209",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {
+ get: function () {
+ return "inheritedDataProperty";
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ child.get = function () {
+ return "ownDataProperty";
+ };
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js
new file mode 100644
index 000000000..79f9f610f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-21",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is not present (8.10.5 step 3)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var attr = {};
+ var accessed = false;
+ Object.defineProperty(obj, "property", attr);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js
new file mode 100644
index 000000000..cedb02558
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-210",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ var fun = function () {
+ return "inheritedAccessorProperty";
+ };
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return fun;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "get", {
+ value: function () {
+ return "ownDataProperty";
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownDataProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js
new file mode 100644
index 000000000..663afb04e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-211",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attributes = {};
+ Object.defineProperty(attributes, "get", {
+ get: function () {
+ return function () {
+ return "ownAccessorProperty";
+ };
+ }
+ });
+
+ Object.defineProperty(obj, "property", attributes);
+
+ return obj.property === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js
new file mode 100644
index 000000000..2a910050e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-212",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return function () {
+ return "inheritedAccessorProperty";
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "inheritedAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js
new file mode 100644
index 000000000..77de24087
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-213",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {
+ get: function () {
+ return "inheritedDataProperty";
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "get", {
+ get: function () {
+ return function () {
+ return "ownAccessorProperty";
+ };
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js
new file mode 100644
index 000000000..d78717749
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-214",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return function () {
+ return "inheritedAccessorProperty";
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "get", {
+ get: function () {
+ return function () {
+ return "ownAccessorProperty";
+ };
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.property === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js
new file mode 100644
index 000000000..b02d94c3b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-215",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own accessor property without a get function (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attributes = {};
+ Object.defineProperty(attributes, "get", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", attributes);
+
+ return typeof obj.property === "undefined" && obj.hasOwnProperty("property");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js
new file mode 100644
index 000000000..a959f66c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-216",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ Object.defineProperty(proto, "get", {
+ get: function () {
+ return function () {
+ return "inheritedAccessorProperty";
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "get", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.hasOwnProperty("property") && typeof obj.property === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js
new file mode 100644
index 000000000..fe987d3e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-217",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js",
+
+ description: "Object.defineProperty - 'get' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ Object.defineProperty(proto, "get", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ return obj.hasOwnProperty("property") && typeof obj.property === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js
new file mode 100644
index 000000000..b8a7d8de1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-218-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Function.prototype.get = function () {
+ return "functionGetProperty";
+ };
+ var funObj = function () { };
+
+ Object.defineProperty(obj, "property", funObj);
+
+ return obj.property === "functionGetProperty";
+ } finally {
+ delete Function.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js
new file mode 100644
index 000000000..9603ef144
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-218",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var funObj = function () { };
+
+ funObj.get = function () {
+ return "functionGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", funObj);
+
+ return obj.property === "functionGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js
new file mode 100644
index 000000000..373eb5317
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-219-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Array.prototype.get = function () {
+ return "arrayGetProperty";
+ };
+ var arrObj = [];
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ return obj.property === "arrayGetProperty";
+ } finally {
+ delete Array.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js
new file mode 100644
index 000000000..3aa509d0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-219",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var arrObj = [];
+
+ arrObj.get = function () {
+ return "arrayGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ return obj.property === "arrayGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js
new file mode 100644
index 000000000..4779c1a42
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-22",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", {
+ enumerable: true
+ });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js
new file mode 100644
index 000000000..e0ed84d8c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-220-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ String.prototype.get = function () {
+ return "stringGetProperty";
+ };
+ var strObj = new String();
+
+ Object.defineProperty(obj, "property", strObj);
+
+ return obj.property === "stringGetProperty";
+ } finally {
+ delete String.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js
new file mode 100644
index 000000000..0bcf9d32e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-220",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var strObj = new String();
+
+ strObj.get = function () {
+ return "stringGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", strObj);
+
+ return obj.property === "stringGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js
new file mode 100644
index 000000000..3e54ae5ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-221-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Boolean.prototype.get = function () {
+ return "booleanGetProperty";
+ };
+ var boolObj = new Boolean(true);
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ return obj.property === "booleanGetProperty";
+ } finally {
+ delete Boolean.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js
new file mode 100644
index 000000000..712664721
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-221",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var boolObj = new Boolean(true);
+
+ boolObj.get = function () {
+ return "booleanGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ return obj.property === "booleanGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js
new file mode 100644
index 000000000..27cd7890d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-222-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Number.prototype.get = function () {
+ return "numberGetProperty";
+ };
+ var numObj = new Number(-2);
+
+ Object.defineProperty(obj, "property", numObj);
+
+ return obj.property === "numberGetProperty";
+ } finally {
+ delete Number.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js
new file mode 100644
index 000000000..619446e75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-222",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var numObj = new Number(-2);
+
+ numObj.get = function () {
+ return "numberGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", numObj);
+
+ return obj.property === "numberGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js
new file mode 100644
index 000000000..c8c2ff278
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-223-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.get = function () {
+ return "mathGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", Math);
+
+ return obj.property === "mathGetProperty";
+ } finally {
+ delete Object.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js
new file mode 100644
index 000000000..a02eff4c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-223",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Math.get = function () {
+ return "mathGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", Math);
+
+ return obj.property === "mathGetProperty";
+ } finally {
+ delete Math.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js
new file mode 100644
index 000000000..7400ccb12
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-224-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Date.prototype.get = function () {
+ return "dateGetProperty";
+ };
+ var dateObj = new Date();
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ return obj.property === "dateGetProperty";
+ } finally {
+ delete Date.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js
new file mode 100644
index 000000000..4be9adb13
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-224",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var dateObj = new Date();
+
+ dateObj.get = function () {
+ return "dateGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ return obj.property === "dateGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js
new file mode 100644
index 000000000..287073315
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-225-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ RegExp.prototype.get = function () {
+ return "regExpGetProperty";
+ };
+ var regObj = new RegExp();
+
+
+ Object.defineProperty(obj, "property", regObj);
+
+ return obj.property === "regExpGetProperty";
+ } finally {
+ delete RegExp.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js
new file mode 100644
index 000000000..29eaf186a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-225",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var regObj = new RegExp();
+
+ regObj.get = function () {
+ return "regExpGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", regObj);
+
+ return obj.property === "regExpGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js
new file mode 100644
index 000000000..db360f86b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-226-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.get = function () {
+ return "jsonGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", JSON);
+
+ return obj.property === "jsonGetProperty";
+ } finally {
+ delete Object.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js
new file mode 100644
index 000000000..9642c3edb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-226",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ JSON.get = function () {
+ return "jsonGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", JSON);
+
+ return obj.property === "jsonGetProperty";
+ } finally {
+ delete JSON.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js
new file mode 100644
index 000000000..64b8a8040
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-227-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Error.prototype.get = function () {
+ return "errorGetProperty";
+ };
+ var errObj = new Error();
+
+ Object.defineProperty(obj, "property", errObj);
+
+ return obj.property === "errorGetProperty";
+ } finally {
+ delete Error.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js
new file mode 100644
index 000000000..c260f35e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-227",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var errObj = new Error();
+
+ errObj.get = function () {
+ return "errorGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", errObj);
+
+ return obj.property === "errorGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js
new file mode 100644
index 000000000..6f9f7c36b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-228-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Object.prototype.get = function () {
+ return "argumentGetProperty";
+ };
+ var argObj = (function () { return arguments; })();
+
+ Object.defineProperty(obj, "property", argObj);
+
+ return obj.property === "argumentGetProperty";
+ } finally {
+ delete Object.prototype.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js
new file mode 100644
index 000000000..f9dc51e27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-228",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var argObj = (function () { return arguments; })();
+
+ argObj.get = function () {
+ return "argumentGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", argObj);
+
+ return obj.property === "argumentGetProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-229.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-229.js
new file mode 100644
index 000000000..0469d904c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-229.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-229",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-229.js",
+
+ description: "Object.defineProperty - 'Attributes' is the document host object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ document.get = function () {
+ return "documentGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", document);
+
+ return obj.property === "documentGetProperty";
+ } finally {
+ delete document.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js
new file mode 100644
index 000000000..e2e194a38
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-23",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var proto = {};
+ Object.defineProperty(proto, "enumerable", {
+ value: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js
new file mode 100644
index 000000000..f2a4ac60e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-230",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js",
+
+ description: "Object.defineProperty - 'Attributes' is the window host object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ window.get = function () {
+ return "windowGetProperty";
+ };
+
+ Object.defineProperty(obj, "property", window);
+
+ return obj.property === "windowGetProperty";
+ } finally {
+ delete window.get;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js
new file mode 100644
index 000000000..b0381db21
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-231",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js",
+
+ description: "Object.defineProperty - value of 'get' property in 'Attributes' is undefined (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ get: undefined
+ });
+
+ return obj.hasOwnProperty("property") && typeof obj.property === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js
new file mode 100644
index 000000000..d3fc40a4a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-232",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js",
+
+ description: "Object.defineProperty - value of 'get' property in 'Attributes' is a function (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return "getFunction";
+ }
+ });
+
+ return obj.hasOwnProperty("property") && obj.property === "getFunction";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-233.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-233.js
new file mode 100644
index 000000000..21cb4c555
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-233.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-233",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-233.js",
+
+ description: "Object.defineProperty - value of 'get' property in 'Attributes' is a host function (8.10.5 step 7.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ get: document.getElementsByTagName
+ });
+
+ try {
+ return obj.property && false;
+ } catch (e) {
+ return e instanceof TypeError && obj.hasOwnProperty("property");
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-234.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-234.js
new file mode 100644
index 000000000..f0b100e27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-234.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-234",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-234.js",
+
+ description: "Object.defineProperty - value of 'get' property in 'Attributes' is a host object that isn't callable (8.10.5 step 7.b)",
+
+ test: function testcase() {
+
+ try {
+ Object.defineProperty({}, "property", {
+ get: document
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js
new file mode 100644
index 000000000..e43d8a293
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-235",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is present (8.10.5 step 8)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ Object.defineProperty(obj, "property", {
+ set: function (value) {
+ data = value;
+ }
+ });
+
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js
new file mode 100644
index 000000000..586b85fed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-236",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is not present (8.10.5 step 8)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return 11;
+ }
+ });
+
+ obj.property = 14;
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ return obj.hasOwnProperty("property") && obj.property === 11 && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js
new file mode 100644
index 000000000..74a863fac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-237",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ Object.defineProperty(obj, "property", {
+ set: function (value) {
+ data = value;
+ }
+ });
+
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js
new file mode 100644
index 000000000..6c066050d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-238",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is an inherited data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var proto = {
+ set: function (value) {
+ data = value;
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js
new file mode 100644
index 000000000..50ef57495
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-239",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data1 = "data";
+ var data2 = "data";
+ var proto = {
+ set: function (value) {
+ data1 = value;
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ child.set = function (value) {
+ data2 = value;
+ };
+
+ Object.defineProperty(obj, "property", child);
+
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data1 === "data" && data2 === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js
new file mode 100644
index 000000000..5fc5fa1b7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-24",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var proto = {};
+ Object.defineProperty(proto, "enumerable", {
+ value: false
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "enumerable", {
+ value: true
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js
new file mode 100644
index 000000000..f54e61fb6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-240",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ var data1 = "data";
+ var data2 = "data";
+
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function (value) {
+ data1 = value;
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ value: function (value) {
+ data2 = value;
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data1 === "data" && data2 === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js
new file mode 100644
index 000000000..f77f23387
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-241",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var attributes = {};
+ Object.defineProperty(attributes, "set", {
+ get: function () {
+ return function (value) {
+ data = value;
+ };
+ }
+ });
+
+ Object.defineProperty(obj, "property", attributes);
+ obj.property = "ownAccessorProperty";
+
+ return obj.hasOwnProperty("property") && data === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js
new file mode 100644
index 000000000..b3995f9ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-242",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ var data = "data";
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function (value) {
+ data = value;
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+ obj.property = "inheritedAccessorProperty";
+
+ return obj.hasOwnProperty("property") && data === "inheritedAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js
new file mode 100644
index 000000000..35201b913
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-243",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data1 = "data";
+ var data2 = "data";
+
+ var proto = {
+ set: function (value) {
+ data1 = value;
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ get: function () {
+ return function (value) {
+ data2 = value;
+ };
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+ obj.property = "ownAccessorProperty";
+
+ return obj.hasOwnProperty("property") && data1 === "data" && data2 === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js
new file mode 100644
index 000000000..23e746fdb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-244",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ var data1 = "data";
+ var data2 = "data";
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function (value) {
+ data1 = value;
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ get: function () {
+ return function (value) {
+ data2 = value;
+ };
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+ obj.property = "ownAccessorProperty";
+
+ return obj.hasOwnProperty("property") && data1 === "data" && data2 === "ownAccessorProperty";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js
new file mode 100644
index 000000000..4e412db47
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-245",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own accessor property without a get function (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var attributes = {};
+ Object.defineProperty(attributes, "set", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", attributes);
+
+ obj.property = "overrideOwnData";
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ return obj.hasOwnProperty("property") && typeof obj.property === "undefined" &&
+ typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js
new file mode 100644
index 000000000..c7273170c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-246",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ var data = "data";
+ Object.defineProperty(proto, "set", {
+ get: function () {
+ return function (value) {
+ data = value;
+ };
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "set", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ obj.property = "overrideData";
+ return obj.hasOwnProperty("property") && typeof obj.property === "undefined" && data === "data";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js
new file mode 100644
index 000000000..641f0d9aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-247",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js",
+
+ description: "Object.defineProperty - 'set' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var proto = {};
+ Object.defineProperty(proto, "set", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ obj.property = "overrideData";
+ return obj.hasOwnProperty("property") && typeof obj.property === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js
new file mode 100644
index 000000000..6a5bdd72f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-248-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ try {
+ Function.prototype.set = function (value) {
+ data = value;
+ };
+ var funObj = function () { };
+
+ Object.defineProperty(obj, "property", funObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Function.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js
new file mode 100644
index 000000000..713a6498d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-248",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var funObj = function () { };
+
+ funObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", funObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js
new file mode 100644
index 000000000..7842738c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-249-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ try {
+ Array.prototype.set = function (value) {
+ data = value;
+ };
+ var arrObj = [];
+
+ Object.defineProperty(obj, "property", arrObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Array.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js
new file mode 100644
index 000000000..48c98e9f3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-249",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var arrObj = [];
+
+ arrObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", arrObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js
new file mode 100644
index 000000000..7d3f85e78
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-25",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var proto = {};
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "enumerable", {
+ value: true
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js
new file mode 100644
index 000000000..b39d6fd46
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-250-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ String.prototype.set = function (value) {
+ data = value;
+ };
+ var strObj = new String();
+ var data = "data";
+
+ Object.defineProperty(obj, "property", strObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete String.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js
new file mode 100644
index 000000000..71352b614
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-250",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var strObj = new String();
+ var data = "data";
+
+ strObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", strObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js
new file mode 100644
index 000000000..52e26731c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-251-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ try {
+ Boolean.prototype.set = function (value) {
+ data = value;
+ };
+ var boolObj = new Boolean(true);
+
+ Object.defineProperty(obj, "property", boolObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Boolean.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js
new file mode 100644
index 000000000..308ee759d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-251",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var boolObj = new Boolean(true);
+
+ boolObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", boolObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js
new file mode 100644
index 000000000..c6b9d031d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-252-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ try {
+ Number.prototype.set = function (value) {
+ data = value;
+ };
+ var numObj = new Number(-2);
+
+ Object.defineProperty(obj, "property", numObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Number.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js
new file mode 100644
index 000000000..3a1bff597
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-252",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var numObj = new Number(-2);
+
+ numObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", numObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js
new file mode 100644
index 000000000..3705cfe5d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-253-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ try {
+ Object.prototype.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", Math);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Object.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js
new file mode 100644
index 000000000..8e2e58d5b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-253",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ try {
+ Math.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", Math);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Math.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js
new file mode 100644
index 000000000..e39f5cee6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-254-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ try {
+ Date.prototype.set = function (value) {
+ data = value;
+ };
+ var dateObj = new Date();
+
+ Object.defineProperty(obj, "property", dateObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Date.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js
new file mode 100644
index 000000000..e36edd3f1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-254",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var dateObj = new Date();
+
+ dateObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", dateObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js
new file mode 100644
index 000000000..8c5dd297b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-255-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ try {
+ RegExp.prototype.set = function (value) {
+ data = value;
+ };
+ var regObj = new RegExp();
+
+ Object.defineProperty(obj, "property", regObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete RegExp.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js
new file mode 100644
index 000000000..3915b3ae8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-255",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js",
+
+ description: "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var regObj = new RegExp();
+
+ regObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", regObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js
new file mode 100644
index 000000000..3f4c10755
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-256-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ try {
+ Object.prototype.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", JSON);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Object.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js
new file mode 100644
index 000000000..579dc7262
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-256",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ try {
+ JSON.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", JSON);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete JSON.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js
new file mode 100644
index 000000000..d799d5826
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-257-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ try {
+ Error.prototype.set = function (value) {
+ data = value;
+ };
+ var errObj = new Error();
+
+ Object.defineProperty(obj, "property", errObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Error.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js
new file mode 100644
index 000000000..858dc2389
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-257",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var errObj = new Error();
+
+ errObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", errObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js
new file mode 100644
index 000000000..c42afec48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-258-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ try {
+ Object.prototype.set = function (value) {
+ data = value;
+ };
+ var argObj = (function () { return arguments; })();
+
+ Object.defineProperty(obj, "property", argObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete Object.prototype.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js
new file mode 100644
index 000000000..c7913e882
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-258",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+ var argObj = (function () { return arguments; })();
+ argObj.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", argObj);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-259.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-259.js
new file mode 100644
index 000000000..36ede1380
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-259.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-259",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-259.js",
+
+ description: "Object.defineProperty - 'Attributes' is the document host object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ try {
+ document.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", document);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete document.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js
new file mode 100644
index 000000000..bc7184168
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-26",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var attr = {};
+ Object.defineProperty(attr, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js
new file mode 100644
index 000000000..64acd3dc1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-260",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js",
+
+ description: "Object.defineProperty - 'Attributes' is the window host object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ try {
+ window.set = function (value) {
+ data = value;
+ };
+
+ Object.defineProperty(obj, "property", window);
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ } finally {
+ delete window.set;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js
new file mode 100644
index 000000000..7ec5b63e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-261",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js",
+
+ description: "Object.defineProperty - value of 'set' property in 'Attributes' is undefined (8.10.5 step 8.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ set: undefined
+ });
+
+ obj.property = "overrideData";
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ return obj.hasOwnProperty("property") && typeof obj.property === "undefined" &&
+ typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js
new file mode 100644
index 000000000..7c5c7bceb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-262",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js",
+
+ description: "Object.defineProperty - value of 'set' property in 'Attributes' is a function (8.10.5 step 8.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var data = "data";
+
+ Object.defineProperty(obj, "property", {
+ set: function (value) {
+ data = value;
+ }
+ });
+ obj.property = "overrideData";
+
+ return obj.hasOwnProperty("property") && data === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-263.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-263.js
new file mode 100644
index 000000000..d8da661de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-263.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-263",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-263.js",
+
+ description: "Object.defineProperty - value of 'get' property of 'Attributes' is a host function (8.10.5 step 8.b)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ set: document.getElementsByTagName
+ });
+
+ try {
+ obj.property = "data";
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-264.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-264.js
new file mode 100644
index 000000000..829bb6fbc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-264.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-264",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-264.js",
+
+ description: "Object.defineProperty - value of 'set' property of 'Attributes' is a host object that isn't callable (8.10.5 step 8.b)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Object.defineProperty(obj, "property", {
+ set: document
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && !obj.hasOwnProperty("property");
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js
new file mode 100644
index 000000000..f61307ab1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-27",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var proto = {};
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js
new file mode 100644
index 000000000..8c9a3c87c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-28",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var proto = { enumerable: false };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(child, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js
new file mode 100644
index 000000000..f302f378c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-29",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ var proto = {};
+
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(child, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js
new file mode 100644
index 000000000..8dde1f7cf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js",
+
+description: "Object.defineProperty throws TypeError if desc has 'set' and 'value' present(8.10.5 step 9.a)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy setter
+ var setter = function () { }
+ var desc = { set: setter, value: 101};
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js
new file mode 100644
index 000000000..6db86ce3e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-30",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var attr = {};
+ Object.defineProperty(attr, "enumerable", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js
new file mode 100644
index 000000000..ae6aaac27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-31",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ var proto = {};
+
+ Object.defineProperty(proto, "enumerable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(child, "enumerable", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js
new file mode 100644
index 000000000..fefdbbf18
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-32",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js",
+
+ description: "Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ var proto = {};
+
+ Object.defineProperty(proto, "enumerable", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js
new file mode 100644
index 000000000..13cd1eebf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-33-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Function.prototype.enumerable = true;
+ var fun = function () { };
+
+ Object.defineProperty(obj, "property", fun);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete Function.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js
new file mode 100644
index 000000000..192f37359
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-33",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var fun = function () { };
+ fun.enumerable = true;
+
+ Object.defineProperty(obj, "property", fun);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js
new file mode 100644
index 000000000..59907e079
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-34-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Array.prototype.enumerable = true;
+ var arrObj = [];
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete Array.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js
new file mode 100644
index 000000000..b35e21b9d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-34",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var arrObj = [];
+ arrObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js
new file mode 100644
index 000000000..21b081791
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-35-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ String.prototype.enumerable = true;
+ var strObj = new String();
+
+ Object.defineProperty(obj, "property", strObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete String.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js
new file mode 100644
index 000000000..a07cdc116
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-35",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var strObj = new String();
+ strObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", strObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js
new file mode 100644
index 000000000..5357ff5c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-36-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Boolean.prototype.enumerable = true;
+ var boolObj = new Boolean(true);
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete Boolean.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js
new file mode 100644
index 000000000..bd5efa8ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-36",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var boolObj = new Boolean(true);
+ boolObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js
new file mode 100644
index 000000000..e05add909
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-37-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Number.prototype.enumerable = true;
+ var numObj = new Number(-2);
+
+ Object.defineProperty(obj, "property", numObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete Number.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js
new file mode 100644
index 000000000..db7c7547b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-37",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var numObj = new Number(-2);
+ numObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", numObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js
new file mode 100644
index 000000000..f3253979e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-38-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Object.prototype.enumerable = true;
+
+ Object.defineProperty(obj, "property", Math);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ } finally {
+ delete Object.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js
new file mode 100644
index 000000000..3bb015cb6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-38",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ try {
+ Math.enumerable = true;
+
+ Object.defineProperty(obj, "property", Math);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ } finally {
+ delete Math.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js
new file mode 100644
index 000000000..00b34da76
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-39-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ try {
+ Date.prototype.enumerable = true;
+ var dateObj = new Date();
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ } finally {
+ delete Date.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js
new file mode 100644
index 000000000..afca5f8cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-39",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var dateObj = new Date();
+ dateObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js
new file mode 100644
index 000000000..5d46ab761
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js",
+
+description: "Object.defineProperty throws TypeError if desc has 'set' and 'writable' present(8.10.5 step 9.a)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var setter = function () { }
+ var desc = { set: setter, writable: false };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js
new file mode 100644
index 000000000..e52116af8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-40-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ RegExp.prototype.enumerable = true;
+ var regObj = new RegExp();
+
+ Object.defineProperty(obj, "property", regObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete RegExp.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js
new file mode 100644
index 000000000..d0943dbd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-40",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js",
+
+ description: "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var regObj = new RegExp();
+ regObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", regObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js
new file mode 100644
index 000000000..0093875b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-41-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Object.prototype.enumerable = true;
+
+ Object.defineProperty(obj, "property", JSON);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete Object.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js
new file mode 100644
index 000000000..39aeca54f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-41",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ try {
+ JSON.enumerable = true;
+
+ Object.defineProperty(obj, "property", JSON);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete JSON.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js
new file mode 100644
index 000000000..fc7a867a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-42-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Error.prototype.enumerable = true;
+ var errObj = new Error();
+
+ Object.defineProperty(obj, "property", errObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete Error.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js
new file mode 100644
index 000000000..e3de30d98
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-42",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var errObj = new Error();
+ errObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", errObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js
new file mode 100644
index 000000000..3d2168c92
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-43-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ try {
+ Object.prototype.enumerable = true;
+ var argObj = (function () { return arguments; })();
+
+ Object.defineProperty(obj, "property", argObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete Object.prototype.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js
new file mode 100644
index 000000000..68386bbbc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-43",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ var argObj = (function () { return arguments; })();
+ argObj.enumerable = true;
+
+ Object.defineProperty(obj, "property", argObj);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-44.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-44.js
new file mode 100644
index 000000000..94af26696
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-44.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-44",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-44.js",
+
+ description: "Object.defineProperty - 'Attributes' is the document host object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ try {
+ document.enumerable = true;
+
+ Object.defineProperty(obj, "property", document);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete document.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js
new file mode 100644
index 000000000..cb14f6973
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js
@@ -0,0 +1,54 @@
+
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-45",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js",
+
+ description: "Object.defineProperty - 'Attributes' is the window host object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ try {
+ window.enumerable = true;
+
+ Object.defineProperty(obj, "property", window);
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+
+ return accessed;
+ } finally {
+ delete window.enumerable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js
new file mode 100644
index 000000000..15d177ec5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-46",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is undefined (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", {
+ enumerable: undefined
+ });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js
new file mode 100644
index 000000000..2695d3a2e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-47",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is null (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: null });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js
new file mode 100644
index 000000000..047beb67d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-48",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is true (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: true });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js
new file mode 100644
index 000000000..64629cddb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-49",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is false (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: false });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js
new file mode 100644
index 000000000..21eee781f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js",
+
+description: "Object.defineProperty throws TypeError if getter is not callable but not undefined (Number)(8.10.5 step 7.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = 42;
+ var desc = { get: getter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js
new file mode 100644
index 000000000..a508c672d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-50",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is 0 (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: 0 });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js
new file mode 100644
index 000000000..afca82a04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-51",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is +0 (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: +0 });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js
new file mode 100644
index 000000000..9055e7f3a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-52",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is -0 (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: -0 });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js
new file mode 100644
index 000000000..5f02f973f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-53",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is NaN (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: NaN });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js
new file mode 100644
index 000000000..707bd592d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-54",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a positive number (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: 12 });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js
new file mode 100644
index 000000000..efe3af6ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-55",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a negative number (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: -2 });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js
new file mode 100644
index 000000000..e1e43e1e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-56",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an empty string (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: "" });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js
new file mode 100644
index 000000000..4d2448fa1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-57",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a non-empty string (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: "AB\n\\cd" });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js
new file mode 100644
index 000000000..da3a6f893
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-58",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Function object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", {
+ enumerable: function () { }
+ });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js
new file mode 100644
index 000000000..cfaeaf2b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-59",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Array object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: [] });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js
new file mode 100644
index 000000000..77022bfb2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js",
+
+description: "Object.defineProperty throws TypeError if getter is not callable but not undefined (Boolean)(8.10.5 step 7.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = true;
+ var desc = { get: getter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js
new file mode 100644
index 000000000..d783cd5b7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-60",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a String Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: new String() });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js
new file mode 100644
index 000000000..eea334074
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-61",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Boolean Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: new Boolean() });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js
new file mode 100644
index 000000000..d2f49f797
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-62",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Number Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: new Number() });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js
new file mode 100644
index 000000000..5b711ef2c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-63",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is the Math Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: Math });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js
new file mode 100644
index 000000000..b69ec4b93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-64",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Date Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: new Date() });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js
new file mode 100644
index 000000000..38ece5be2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-65",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a RegExp Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: new RegExp() });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js
new file mode 100644
index 000000000..344a54a70
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-66",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is the JSON Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: JSON });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js
new file mode 100644
index 000000000..db85d1925
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-67",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Error Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: new Error() });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js
new file mode 100644
index 000000000..6c6628bbd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-68",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Arguments Object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+ var argObj = (function () { return arguments; })(0, 1, 2);
+
+ Object.defineProperty(obj, "property", { enumerable: argObj });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-69.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-69.js
new file mode 100644
index 000000000..5525019bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-69.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-69",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-69.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is the document host object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: document });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js
new file mode 100644
index 000000000..2d50f6fdb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-7",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js",
+
+description: "Object.defineProperty throws TypeError if getter is not callable but not undefined (String)(8.10.5 step 7.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = "abc";
+ var desc = { get: getter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js
new file mode 100644
index 000000000..bf297147d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-70",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is the window host object (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: window });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js
new file mode 100644
index 000000000..589b3c0ee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-71",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is treated as true when it is a string (value is 'false') (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: "false" });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js
new file mode 100644
index 000000000..137a0b4e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-72",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js",
+
+ description: "Object.defineProperty - value of 'enumerable' property in 'Attributes' is new Boolean(false) which is treated as true value (8.10.5 step 3.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var accessed = false;
+
+ Object.defineProperty(obj, "property", { enumerable: new Boolean(false) });
+
+ for (var prop in obj) {
+ if (prop === "property") {
+ accessed = true;
+ }
+ }
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js
new file mode 100644
index 000000000..de09d18f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-73",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is present (8.10.5 step 4)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ configurable: false
+ });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js
new file mode 100644
index 000000000..11188bc62
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-74",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is not present (8.10.5 step 4)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { value: 100 });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = (obj.property === 100);
+
+ return beforeDeleted === true && afterDeleted === true;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js
new file mode 100644
index 000000000..c6c4e709f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-75",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", {
+ configurable: true
+ });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js
new file mode 100644
index 000000000..f2fc0e8ad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-76",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is an inherited data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {
+ configurable: false
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+ return beforeDeleted && afterDeleted && typeof (obj.property) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js
new file mode 100644
index 000000000..5e2d4732c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-77",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var proto = {
+ configurable: false
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ child.configurable = true;
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js
new file mode 100644
index 000000000..73b9fc27c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-78",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = { };
+
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "configurable", {
+ value: true
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js
new file mode 100644
index 000000000..bb430b723
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-79",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var attr = {};
+ Object.defineProperty(attr, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js
new file mode 100644
index 000000000..3aa5053fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-8",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js",
+
+description: "Object.defineProperty throws TypeError if getter is not callable but not undefined (Null)(8.10.5 step 7.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = null;
+ var desc = { get: getter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js
new file mode 100644
index 000000000..a21a88462
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-80",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js
new file mode 100644
index 000000000..974b98a67
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-81",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {
+ configurable: false
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js
new file mode 100644
index 000000000..a8b237ded
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-82",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return false;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js
new file mode 100644
index 000000000..4f3a894dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-83",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var attr = {};
+ Object.defineProperty(attr, "configurable", {
+ set : function () { }
+ });
+
+ Object.defineProperty(obj, "property", attr);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js
new file mode 100644
index 000000000..bce2f6761
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-84",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "configurable", {
+ get: function () {
+ return true;
+ }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ Object.defineProperty(child, "configurable", {
+ set: function () { }
+ });
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js
new file mode 100644
index 000000000..0ae19b8cf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-85",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var proto = {};
+ Object.defineProperty(proto, "configurable", {
+ set: function () { }
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+
+ Object.defineProperty(obj, "property", child);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js
new file mode 100644
index 000000000..00a745338
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-86-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'configurable' property of prototype object (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Function.prototype.configurable = true;
+ var funObj = function (a, b) {
+ return a + b;
+ };
+
+ Object.defineProperty(obj, "property", funObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Function.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js
new file mode 100644
index 000000000..1b4c7cfc9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-86",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var funObj = function (a, b) {
+ return a + b;
+ };
+
+ funObj.configurable = true;
+
+ Object.defineProperty(obj, "property", funObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js
new file mode 100644
index 000000000..88b0f0123
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-87-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Array.prototype.configurable = true;
+ var arrObj = [1, 2, 3];
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Array.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js
new file mode 100644
index 000000000..967320342
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-87",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var arrObj = [1, 2, 3];
+
+ arrObj.configurable = true;
+
+ Object.defineProperty(obj, "property", arrObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js
new file mode 100644
index 000000000..e50aa5af5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-88-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ String.prototype.configurable = true;
+ var strObj = new String("abc");
+
+ Object.defineProperty(obj, "property", strObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete String.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js
new file mode 100644
index 000000000..0938a1c99
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-88",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js",
+
+ description: "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var strObj = new String("abc");
+
+ strObj.configurable = true;
+
+ Object.defineProperty(obj, "property", strObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js
new file mode 100644
index 000000000..dce2c446c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-89-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Boolean.prototype.configurable = true;
+ var boolObj = new Boolean(true);
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Boolean.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js
new file mode 100644
index 000000000..201b42645
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-89",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var boolObj = new Boolean(true);
+
+ boolObj.configurable = true;
+
+ Object.defineProperty(obj, "property", boolObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js
new file mode 100644
index 000000000..24806918a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+The abtract operation ToPropertyDescriptor is used to package the
+into a property desc. Step 10 of ToPropertyDescriptor throws a TypeError
+if the property desc ends up having a mix of accessor and data property elements.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-3-9",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js",
+
+description: "Object.defineProperty throws TypeError if getter is not callable but not undefined (Object)(8.10.5 step 7.b)",
+
+test: function testcase() {
+ var o = {};
+
+ // dummy getter
+ var getter = { a: 1 };
+ var desc = { get: getter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js
new file mode 100644
index 000000000..bd74343e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-90-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Number.prototype.configurable = true;
+ var numObj = new Number(-2);
+
+ Object.defineProperty(obj, "property", numObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Number.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js
new file mode 100644
index 000000000..f846da599
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-90",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var numObj = new Number(-2);
+
+ numObj.configurable = true;
+
+ Object.defineProperty(obj, "property", numObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js
new file mode 100644
index 000000000..b5aaa37f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-91-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.configurable = true;
+
+ Object.defineProperty(obj, "property", Math);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Object.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js
new file mode 100644
index 000000000..867df4cdf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-91",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js",
+
+ description: "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Math.configurable = true;
+
+ Object.defineProperty(obj, "property", Math);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Math.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js
new file mode 100644
index 000000000..175ff20b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-92-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Date.prototype.configurable = true;
+ var dateObj = new Date();
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Date.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js
new file mode 100644
index 000000000..f3a1c7c2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-92",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js",
+
+ description: "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var dateObj = new Date();
+
+ dateObj.configurable = true;
+
+ Object.defineProperty(obj, "property", dateObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js
new file mode 100644
index 000000000..b157c3bbb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-93-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ RegExp.prototype.configurable = true;
+ var regObj = new RegExp();
+
+ Object.defineProperty(obj, "property", regObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete RegExp.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js
new file mode 100644
index 000000000..46445608f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-93",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js",
+
+ description: "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var regObj = new RegExp();
+
+ regObj.configurable = true;
+
+ Object.defineProperty(obj, "property", regObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js
new file mode 100644
index 000000000..03656ab7f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-94-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.configurable = true;
+
+ Object.defineProperty(obj, "property", JSON);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Object.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js
new file mode 100644
index 000000000..adca108d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-94",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js",
+
+ description: "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ JSON.configurable = true;
+
+ Object.defineProperty(obj, "property", JSON);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete JSON.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js
new file mode 100644
index 000000000..a9d4ffada
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-95-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+ try {
+ Error.prototype.configurable = true;
+ var errObj = new Error();
+
+ Object.defineProperty(obj, "property", errObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Error.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js
new file mode 100644
index 000000000..115b64047
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-95",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = { };
+
+ var errObj = new Error();
+
+ errObj.configurable = true;
+
+ Object.defineProperty(obj, "property", errObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js
new file mode 100644
index 000000000..2fbcc082e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-96-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ Object.prototype.configurable = true;
+ var argObj = (function () { return arguments; })();
+
+ Object.defineProperty(obj, "property", argObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete Object.prototype.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js
new file mode 100644
index 000000000..b40e51e44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-96",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js",
+
+ description: "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var argObj = (function () { return arguments; })();
+ argObj.configurable = true;
+
+ Object.defineProperty(obj, "property", argObj);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-97.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-97.js
new file mode 100644
index 000000000..1c12bd04b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-97.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-97",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-97.js",
+
+ description: "Object.defineProperty - 'Attributes' is the document host object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ document.configurable = true;
+
+ Object.defineProperty(obj, "property", document);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete document.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js
new file mode 100644
index 000000000..b003ac123
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-3-98",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js",
+
+ description: "Object.defineProperty - 'Attributes' is the window host object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ try {
+ window.configurable = true;
+
+ Object.defineProperty(obj, "property", window);
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property");
+
+ return beforeDeleted === true && afterDeleted === false;
+ } finally {
+ delete window.configurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js
new file mode 100644
index 000000000..12831d506
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+ id: "15.2.3.6-3-99",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js",
+
+ description: "Object.defineProperty - 'configurable' property in 'Attributes' is undefined (8.10.5 step 4.b)",
+
+ test: function testcase() {
+ var obj = { };
+
+ Object.defineProperty(obj, "property", { configurable: undefined });
+
+ var beforeDeleted = obj.hasOwnProperty("property");
+
+ delete obj.property;
+
+ var afterDeleted = obj.hasOwnProperty("property") && typeof (obj.property) === "undefined";
+
+ return beforeDeleted === true && afterDeleted === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js
new file mode 100644
index 000000000..e1bd1b99a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O passing 'true' for the Throw flag. In this case, step 3 of
+[[DefineOwnProperty]] requires that it throw a TypeError exception when
+current is undefined and extensible is false. The value of desc does not
+matter.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js",
+
+description: "Object.defineProperty throws TypeError when adding properties to non-extensible objects(8.12.9 step 3)",
+
+test: function testcase() {
+ var o = {};
+ Object.preventExtensions(o);
+
+ try {
+ var desc = { value: 1 };
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError &&
+ (o.hasOwnProperty("foo") === false)) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.preventExtensions);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js
new file mode 100644
index 000000000..8b6127bda
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if
+current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations
+of each other.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-10",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js",
+
+description: "Object.defineProperty throws TypeError when changing [[Enumerable]] from false to true on non-configurable accessor properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create an accessor property; all other attributes default to false.
+ // dummy getter
+ var getter = function () { return 1; }
+ var d1 = { get: getter, enumerable: false, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, setting enumerable to true should fail, since [[Configurable]]
+ // on the original property will be false.
+ var desc = { get: getter, enumerable: true };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.get === getter &&
+ d2.enumerable === false &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js
new file mode 100644
index 000000000..607aa6a15
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-100",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are data properties, desc.value and name.value are two different values (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", {
+ value: 200
+ });
+ return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js
new file mode 100644
index 000000000..b8644767b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-101",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are data properties, name.value is present and desc.value is undefined (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", { value: undefined });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js
new file mode 100644
index 000000000..d3be686e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-102",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are data properties, desc.value is present and name.value is undefined (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = undefined; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", { value: 100 });
+ return dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js
new file mode 100644
index 000000000..a96ff1f77
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-103",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are data properties, name.writable and desc.writable are different values (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ writable: false, configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ writable: true
+ });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js
new file mode 100644
index 000000000..b917c2490
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-104",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are data properties, name.enumerable and desc.enumerable are different values (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: true
+ });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js
new file mode 100644
index 000000000..010f048ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-105",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are data properties, name.configurable = true and desc.configurable = false (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 200,
+ enumerable: true,
+ writable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js
new file mode 100644
index 000000000..e3f7293d0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-106",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are data properties, several attributes values of name and desc are different (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 100,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ value: 200,
+ writable: false,
+ enumerable: false
+ });
+ return dataPropertyAttributesAreCorrect(obj, "foo", 200, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js
new file mode 100644
index 000000000..cddb1cb7e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-107",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, both desc.[[Get]] and name.[[Get]] are two different values (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 10;
+ }
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc,
+ configurable: true
+ });
+
+ function getFunc2() {
+ return 20;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc2
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js
new file mode 100644
index 000000000..60cde948c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-108",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Get]] is present and desc.[[Get]] is undefined (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 10;
+ }
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc,
+ get: undefined
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js
new file mode 100644
index 000000000..24bd92769
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-109",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Get]] is undefined and desc.[[Get]] is function (8.12.9 step 12)",
+
+ test: function testcase() {
+ var obj = {};
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc,
+ get: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ function getFunc() {
+ return 10;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js
new file mode 100644
index 000000000..3ffba3ba7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if
+current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations
+of each other.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-11",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js",
+
+description: "Object.defineProperty throws TypeError when changing [[Enumerable]] from true to false on non-configurable accessor properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create an accessor property; all other attributes default to false.
+ // dummy getter
+ var getter = function () { return 1; }
+ var d1 = { get: getter, enumerable: true, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, setting enumerable to true should fail, since [[Configurable]]
+ // on the original property will be false.
+ var desc = { get: getter, enumerable: false };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.get === getter &&
+ d2.enumerable === true &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js
new file mode 100644
index 000000000..7a6d7b38a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-110",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, both desc.[[Set]] and name.[[Set]] are two different values (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function setFunc1() {
+ return 10;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc1,
+ enumerable: true,
+ configurable: true
+ });
+
+ function setFunc2(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc2
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc2, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js
new file mode 100644
index 000000000..7ff5ee7d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-111",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Set]] is present and desc.[[Set]] is undefined (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 10;
+ }
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ set: undefined,
+ get: getFunc
+ });
+
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "foo");
+ return obj.hasOwnProperty("foo") && typeof (desc.set) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js
new file mode 100644
index 000000000..0d524c2da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-112",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Set]] is undefined and desc.[[Set]] is function (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 10;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ set: undefined,
+ get: getFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js
new file mode 100644
index 000000000..270de8c3a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-113",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, name.enumerable and desc.enumerable are different values (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 10;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ enumerable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, undefined, undefined, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js
new file mode 100644
index 000000000..45a80e68c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-114",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, name.configurable = true and desc.configurable = false (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ function getFunc() {
+ return 10;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ configurable: false
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js
new file mode 100644
index 000000000..dd595be06
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-115",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js",
+
+ description: "Object.defineProperty - 'name' and 'desc' are accessor properties, several attributes values of 'name' and 'desc' are different (8.12.9 step 12)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc1() {
+ return 10;
+ }
+ function setFunc1() {}
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc1,
+ set: setFunc1,
+ enumerable: true,
+ configurable: true
+ });
+
+ function getFunc2() {
+ return 20;
+ }
+ function setFunc2(value) {
+ obj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(obj, "foo", {
+ get: getFunc2,
+ set: setFunc2,
+ enumerable: false
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc2, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js
new file mode 100644
index 000000000..1bdc3b77e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-116",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js",
+
+ description: "Object.defineProperty - 'O' is an Array, test the length property of 'O' is own data property (15.4.5.1 step 1)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+ Object.defineProperty(arrObj, "1", {
+ value: 1,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arrObj, "length", { value: 1 });
+ return false;
+ } catch (e) {
+ var desc = Object.getOwnPropertyDescriptor(arrObj, "length");
+
+ return Object.hasOwnProperty.call(arrObj, "length") && desc.value === 2 &&
+ desc.writable === true && desc.configurable === false && desc.enumerable === false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js
new file mode 100644
index 000000000..c51830c46
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-117",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js",
+
+ description: "Object.defineProperty - 'O' is an Array, test the length property of 'O' is own data property that overrides an inherited data property (15.4.5.1 step 1)",
+
+ test: function testcase() {
+ var arrObj = [0, 1, 2];
+ var arrProtoLen;
+
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+
+
+ Object.defineProperty(arrObj, "2", {
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 3 && Array.prototype.length === 0;
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js
new file mode 100644
index 000000000..2fb32fee2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-118",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is absent (15.4.5.1 step 3.a.i)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {});
+
+ var verifyValue = false;
+ if (arrObj.length === 0) {
+ verifyValue = true;
+ }
+
+ arrObj.length = 2;
+ var verifyWritable = arrObj.length === 2 ? true : false;
+
+ var verifyEnumerable = false;
+ for (var p in arrObj) {
+ if (p === "length" && arrObj.hasOwnProperty(p)) {
+ verifyEnumerable = true;
+ }
+ }
+
+ delete arrObj.length;
+ var verifyConfigurable = arrObj.hasOwnProperty("length");
+
+ return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js
new file mode 100644
index 000000000..10dc69ad3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-119",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is same with corresponding attribute value of the length property in 'O' (15.4.5.1 step 3.a.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ Object.defineProperty(arrObj, "length", {
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+
+ var verifyValue = false;
+ if (arrObj.length === 0) {
+ verifyValue = true;
+ }
+
+ arrObj.length = 2;
+ var verifyWritable = arrObj.length === 2 ? true : false;
+
+ var verifyEnumerable = false;
+ for (var p in arrObj) {
+ if (p === "length" && arrObj.hasOwnProperty(p)) {
+ verifyEnumerable = true;
+ }
+ }
+
+ delete arrObj.length;
+ var verifyConfigurable = arrObj.hasOwnProperty("length");
+
+ return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js
new file mode 100644
index 000000000..fe95aa6bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js
@@ -0,0 +1,68 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 9a of
+[[DefineOwnProperty]] rejects changing the kind of a property.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-12",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js",
+
+description: "Object.defineProperty throws TypeError when changing non-configurable data properties to accessor properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create a data valued property; all other attributes default to false.
+ var d1 = { value: 101, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ // changing "foo" to be an accessor should fail, since [[Configurable]]
+ // on the original property will be false.
+
+ // dummy getter
+ var getter = function () { return 1; }
+
+ var desc = { get: getter };
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain a data valued property.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.value === 101 &&
+ d2.writable === false &&
+ d2.enumerable === false &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js
new file mode 100644
index 000000000..cabe3e3ee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-120",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Configurable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ try {
+ Object.defineProperty(arrObj, "length", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js
new file mode 100644
index 000000000..27d2b4b46
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-121",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Enumerable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ try {
+ Object.defineProperty(arrObj, "length", {
+ enumerable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js
new file mode 100644
index 000000000..d85697abb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-122",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when 'desc' is accessor descriptor (15.4.5.1 step 3.a.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ try {
+ Object.defineProperty(arrObj, "length", {
+ get: function () {
+ return 2;
+ }
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js
new file mode 100644
index 000000000..b0fd57699
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-123",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Writable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ try {
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+ Object.defineProperty(arrObj, "length", {
+ writable: true
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js
new file mode 100644
index 000000000..8ccb6de93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-124",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test updating the [[Writable]] attribute of the length property from true to false (15.4.5.1 step 3.a.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "length", 0, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js
new file mode 100644
index 000000000..62aa12102
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-125",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test that RangeError exception is thrown when [[Value]] field of 'desc' is undefined (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: undefined
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js
new file mode 100644
index 000000000..00daff91d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-126",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is null (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: null
+ });
+ return arrObj.length === 0;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js
new file mode 100644
index 000000000..8d773cf1b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-127",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value false (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: false
+ });
+ return arrObj.length === 0 && !arrObj.hasOwnProperty("0") && !arrObj.hasOwnProperty("1");
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js
new file mode 100644
index 000000000..61a40fbd0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-128",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value true (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: true
+ });
+ return arrObj.length === 1;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js
new file mode 100644
index 000000000..dd05d3fb4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-129",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is 0 (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 0
+ });
+ return arrObj.length === 0;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js
new file mode 100644
index 000000000..8ff3ffef0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 9a of
+[[DefineOwnProperty]] rejects changing the kind of a property.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-13",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js",
+
+description: "Object.defineProperty throws TypeError when changing non-configurable accessor properties to data properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create an accessor property; all other attributes default to false.
+
+ // dummy getter
+ var getter = function () { return 1; }
+ var d1 = { get: getter, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ // changing "foo" to be a data property should fail, since [[Configurable]]
+ // on the original property will be false.
+ var desc = { value: 101 };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain an accessor property.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.get === getter &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js
new file mode 100644
index 000000000..b58e2855e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-130",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is +0 (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: +0
+ });
+ return arrObj.length === 0;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js
new file mode 100644
index 000000000..16691abdd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-131",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is -0 (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: -0
+ });
+ return arrObj.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js
new file mode 100644
index 000000000..2f59fa6e3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-132",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is a positive number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 12
+ });
+ return arrObj.length === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js
new file mode 100644
index 000000000..2be91da1a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-133",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a negative number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: -9
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js
new file mode 100644
index 000000000..773118a0f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-134",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is +Infinity (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: +Infinity
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js
new file mode 100644
index 000000000..e43bb1aff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-135",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is -Infinity (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: -Infinity
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js
new file mode 100644
index 000000000..265bc26e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-136",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is NaN (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: NaN
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js
new file mode 100644
index 000000000..c5767b62f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-137",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is a string containing a positive number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: "2"
+ });
+ return arrObj.length === 2;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js
new file mode 100644
index 000000000..6d3d969a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-138",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing a negative number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: "-42"
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js
new file mode 100644
index 000000000..d820b4bf2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-139",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing a decimal number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: "200.59"
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js
new file mode 100644
index 000000000..5aad866a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For configurable properties, step 9b of
+[[DefineOwnProperty]] permits changing the kind of a property.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-14",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js",
+
+description: "Object.defineProperty permits changing data property to accessor property for configurable properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create a data property. In this case,
+ // [[Enumerable]] and [[Configurable]] are true
+ o["foo"] = 101;
+
+ // changing "foo" to be an accessor should succeed, since [[Configurable]]
+ // on the original property will be true. Existing values of [[Configurable]]
+ // and [[Enumerable]] need to be preserved and the rest need to be set to
+ // their default values
+
+ // dummy getter
+ var getter = function () { return 1; }
+ var d1 = { get: getter };
+ Object.defineProperty(o, "foo", d1);
+
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (d2.get === getter &&
+ d2.enumerable === true &&
+ d2.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js
new file mode 100644
index 000000000..d79a24dfe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-140",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing +Infinity (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: "+Infinity"
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js
new file mode 100644
index 000000000..750f11ce9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-141",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing -Infinity (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: "-Infinity"
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js
new file mode 100644
index 000000000..8c4eaba41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-142",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an exponential number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: "2E3"
+ });
+ return arrObj.length === 2E3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js
new file mode 100644
index 000000000..40e9cdd04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-143",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a hex number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: "0x00B"
+ });
+ return arrObj.length === 0x00B;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js
new file mode 100644
index 000000000..8de2533db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-144",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a number with leading zeros (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: "0002.0"
+ });
+ return arrObj.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js
new file mode 100644
index 000000000..d1f75d65b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-145",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string which doesn't convert to a number (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: "two"
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js
new file mode 100644
index 000000000..399a309ad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-146",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an object which has an own toString method (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: {
+ toString: function () {
+ return '2';
+ }
+ }
+ });
+ return arrObj.length === 2;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js
new file mode 100644
index 000000000..38e374c82
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-147",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: {
+ valueOf: function () {
+ return 2;
+ }
+ }
+ });
+ return arrObj.length === 2;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js
new file mode 100644
index 000000000..d8370aed1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-148",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method that returns an object and toString method that returns a string (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ Object.defineProperty(arrObj, "length", {
+ value: {
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ }
+ });
+ return arrObj.length === 2 && toStringAccessed && valueOfAccessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js
new file mode 100644
index 000000000..2bb973be8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-149",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own toString and valueOf method (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ Object.defineProperty(arrObj, "length", {
+ value: {
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 3;
+ }
+ }
+ });
+ return arrObj.length === 3 && !toStringAccessed && valueOfAccessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js
new file mode 100644
index 000000000..9356813e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For configurable properties, step 9c of
+[[DefineOwnProperty]] permits changing the kind of a property.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-15",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js",
+
+description: "Object.defineProperty permits changing accessor property to data property for configurable properties",
+
+test: function testcase() {
+ var o = {};
+
+ // define an accessor property
+ // dummy getter
+ var getter = function () { return 1; }
+ var d1 = { get: getter, configurable: true };
+ Object.defineProperty(o, "foo", d1);
+
+ // changing "foo" to be a data valued property should succeed, since
+ // [[Configurable]] on the original property will be true. Existing
+ // values of [[Configurable]] and [[Enumerable]] need to be preserved
+ // and the rest need to be set to their default values.
+ var desc = { value: 101 };
+ Object.defineProperty(o, "foo", desc);
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (d2.value === 101 &&
+ d2.writable === false &&
+ d2.enumerable === false &&
+ d2.configurable === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js
new file mode 100644
index 000000000..23a8de695
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-150",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when the [[Value]] field of 'desc' is an Object that both toString and valueOf wouldn't return primitive value (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ }
+ });
+ return false;
+
+ } catch (e) {
+ return e instanceof TypeError && toStringAccessed && valueOfAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js
new file mode 100644
index 000000000..38312929e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-151",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', and the [[Value]] field of 'desc' is an Object with an own toString method and an inherited valueOf method (15.4.5.1 step 3.c), test that the inherited valueOf method is used",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+
+ var child = new ConstructFun();
+ child.toString = function () {
+ toStringAccessed = true;
+ return 3;
+ };
+
+ Object.defineProperty(arrObj, "length", {
+ value: child
+ });
+ return arrObj.length === 2 && !toStringAccessed && valueOfAccessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js
new file mode 100644
index 000000000..f5feb031c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-152",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a positive non-integer values (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: 123.5
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js
new file mode 100644
index 000000000..6ddc86677
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-153",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length prosperty of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a negative non-integer values (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: -4294967294.5
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js
new file mode 100644
index 000000000..a2f3f8875
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-154",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 2 (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 4294967294
+ });
+
+ return arrObj.length === 4294967294;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js
new file mode 100644
index 000000000..1ab4f32fa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-155",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 1 (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 4294967295
+ });
+
+ return arrObj.length === 4294967295;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js
new file mode 100644
index 000000000..5bcfea32a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-156",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: 4294967296
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js
new file mode 100644
index 000000000..e332d66f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-157",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 + 1 (15.4.5.1 step 3.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: 4294967297
+ });
+ return false;
+ } catch (e) {
+ return e instanceof RangeError;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js
new file mode 100644
index 000000000..6f9c2c41e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-159",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value greater than the existing value of length (15.4.5.1 step 3.f)",
+
+ test: function testcase() {
+
+ var arrObj = [0, , 2];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 5
+ });
+
+ return arrObj.length === 5 && arrObj[0] === 0 &&
+ !arrObj.hasOwnProperty("1") && arrObj[2] === 2 &&
+ !arrObj.hasOwnProperty("4");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js
new file mode 100644
index 000000000..20ca34e67
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 10.a.i
+of [[DefineOwnProperty]] rejects if relaxing the [[Writable]] attribute.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-16",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js",
+
+description: "Object.defineProperty throws TypeError when relaxing [[Writable]] on non-configurable data properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create a data valued property; all other attributes default to false.
+ var d1 = { value: 101 };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, relaxing [[Writable]] on "foo" should fail, since both
+ // [[Configurable]] and [[Writable]] on the original property will be false.
+ var desc = { value: 101, writable: true };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.value === 101 &&
+ d2.writable === false &&
+ d2.enumerable === false &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js
new file mode 100644
index 000000000..8a08d2f26
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-160",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value equal to the existing value of length (15.4.5.1 step 3.f)",
+
+ test: function testcase() {
+
+ var arrObj = [0, , 2];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 3
+ });
+
+ return arrObj.length === 3 && arrObj[0] === 0 && !arrObj.hasOwnProperty("1") && arrObj[2] === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js
new file mode 100644
index 000000000..74a75a0ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-161",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value lesser than the existing value of length and test that indexes beyond the new length are deleted(15.4.5.1 step 3.f)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+ return arrObj.length === 1 && !arrObj.hasOwnProperty("1");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js
new file mode 100644
index 000000000..ff590b5a8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-162",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: 12
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js
new file mode 100644
index 000000000..468f71bcc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-163",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' equals to value of the length property, test no TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: 0
+ });
+ return true;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js
new file mode 100644
index 000000000..b07e647bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-164",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test TypeError is thrown when the [[Writable]] attribute of the length property is false (15.4.5.1 step 3.g)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: 0
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js
new file mode 100644
index 000000000..de0742537
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-165",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true after deleting properties with large index named if the [[Writable]] field of 'desc' is absent (15.4.5.1 step 3.h)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+
+ var indexDeleted = !arrObj.hasOwnProperty("1");
+
+ arrObj.length = 10;
+
+ return indexDeleted && arrObj.length === 10;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js
new file mode 100644
index 000000000..e3412a495
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-166",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true after deleting properties with large index named if the [[Writable]] field of 'desc' is true (15.4.5.1 step 3.h)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1,
+ writable: true
+ });
+
+ var indexDeleted = !arrObj.hasOwnProperty("1");
+
+ arrObj.length = 10;
+
+ return indexDeleted && arrObj.length === 10;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js
new file mode 100644
index 000000000..4c1bf9b6d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-167",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false after deleting properties with large index named if the [[Writable]] field of 'desc' is false (15.4.5.1 step 3.i.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1,
+ writable: false
+ });
+
+ var indexDeleted = !arrObj.hasOwnProperty("1");
+
+ arrObj.length = 10;
+
+ return indexDeleted && arrObj.length === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js
new file mode 100644
index 000000000..ab759913f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-168",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', whose writable attribute is being changed to false and the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable:false, test that new length is set to a value greater than the non-deletable index by 1, writable attribute of length is set to false and TypeError exception is thrown (15.4.5.1 step 3.i.iii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1, 2];
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 0,
+ writable: false
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js
new file mode 100644
index 000000000..489f37de0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-169",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable: false, test that new length is set to a value greater than the non-deletable index by 1, and TypeError is thrown (15.4.5.1 step 3.l.i)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1, 2];
+
+ Object.defineProperty(arrObj, "1", {
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "2", {
+ configurable: true
+ });
+
+ try {
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2 && !arrObj.hasOwnProperty("2");
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js
new file mode 100644
index 000000000..2ee3d9745
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 10.a.ii.1
+of [[DefineOwnProperty]] rejects changing the value of non-writable properties.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-17",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js",
+
+description: "Object.defineProperty throws TypeError when changing value of non-writable non-configurable data properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create a data valued property; all other attributes default to false.
+ var d1 = { value: 101 };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, trying to change the value of "foo" should fail, since both
+ // [[Configurable]] and [[Writable]] on the original property will be false.
+ var desc = { value: 102 };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (d2.value === 101 &&
+ d2.writable === false &&
+ d2.enumerable === false &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js
new file mode 100644
index 000000000..96d6fc24a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-170",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable: false, test that new length is set to a value greater than the non-deletable index by 1, writable attribute of length is set to false and TypeError exception is thrown (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1");
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js
new file mode 100644
index 000000000..2bfeffc73
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-171",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of an inherited data property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+ try {
+ Array.prototype[1] = 2; // Not setting the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+ return arrObj.length === 1 && !arrObj.hasOwnProperty("1");
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js
new file mode 100644
index 000000000..e368e9316
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-172",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides an inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+ try {
+ Object.defineProperty(arrObj, "1", {
+ configurable: false
+ });
+
+ Array.prototype[1] = 2;
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1");
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js
new file mode 100644
index 000000000..4ef8c99d0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-173",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides an inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+ try {
+ Object.defineProperty(arrObj, "1", {
+ configurable: false
+ });
+
+ Object.defineProperty(Array.prototype, "1", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1");
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js
new file mode 100644
index 000000000..02e666cd6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-174",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ get: function () {
+ return 1;
+ },
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1");
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js
new file mode 100644
index 000000000..f6d65a647
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-175",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of an inherited accessor property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+ try {
+ Object.defineProperty(Array.prototype, "1", {
+ get: function () {
+ return 1;
+ },
+ configurable: true // Not setting the [[Configurable]] attribute of property "1" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+
+ return arrObj.length === 1 && !arrObj.hasOwnProperty("1");
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js
new file mode 100644
index 000000000..ca12f3dcb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-176",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides an inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+ try {
+ Object.defineProperty(arrObj, "1", {
+ get: function () {
+ return 2;
+ },
+ configurable: false
+ });
+
+ Array.prototype[1] = 2;
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1");
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js
new file mode 100644
index 000000000..87d814472
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-177",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides an inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+ try {
+ Object.defineProperty(arrObj, "1", {
+ get: function () {
+ return 1;
+ },
+ configurable: false
+ });
+
+ Object.defineProperty(Array.prototype, "1", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty("1");
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js
new file mode 100644
index 000000000..19430b50a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-178",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the configurable large index named property of 'O' is deleted (15.4.5.1 step 3.l.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 1
+ });
+
+ return !arrObj.hasOwnProperty("1");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js
new file mode 100644
index 000000000..fad037140
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-179-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test value of the length property is same as [[Value]] (15.4.5.1 step 3.l.iii.1)",
+
+ test: function testcase() {
+ var arrObj = [0, 1, 2, 3];
+
+ Object.defineProperty(arrObj, "1", {
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "length", {
+ value: 3
+ });
+
+ return arrObj.length === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js
new file mode 100644
index 000000000..79f9082f3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 11.a.i
+of [[DefineOwnProperty]] rejects changing the setter if present.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-18",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js",
+
+description: "Object.defineProperty throws TypeError when changing setter of non-configurable accessor properties(8.12.9 step 11.a.i)",
+
+test: function testcase() {
+ var o = {};
+
+ // create an accessor property; all other attributes default to false.
+ // dummy getter
+ var getter = function () { return 1;}
+ var d1 = { get: getter };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, trying to change the setter should fail, since [[Configurable]]
+ // on the original property will be false.
+ var setter = function (x) {};
+ var desc = { set: setter };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.get === getter &&
+ d2.configurable === false &&
+ d2.enumerable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js
new file mode 100644
index 000000000..22d327bcb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-181",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last when the [[Writable]] field of 'desc' is false and 'O' doesn't contain non-configurable large index named property (15.4.5.1 step 3.m)",
+
+ test: function testcase() {
+
+ var arrObj = [0, 1];
+
+ Object.defineProperty(arrObj, "length", {
+ value: 0,
+ writable: false
+ });
+
+ arrObj.length = 10; //try to overwrite length value of arr
+ return !arrObj.hasOwnProperty("1") && arrObj.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js
new file mode 100644
index 000000000..5320c604d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.2.3.6-4-182",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is available String values that convert to numbers (15.4.5.1 step 4.a)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ value: 12
+ });
+
+ return arrObj[0] === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js
new file mode 100644
index 000000000..37a5d85da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-183",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 - 2 (15.4.5.1 step 4.a)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 4294967294, {
+ value: 100
+ });
+
+ return arrObj.hasOwnProperty("4294967294") && arrObj.length === 4294967295 && arrObj[4294967294] === 100;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js
new file mode 100644
index 000000000..35729db7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-184",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 - 1 (15.4.5.1 step 4.a)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 4294967295, {
+ value: 100
+ });
+
+ return arrObj.hasOwnProperty("4294967295") && arrObj.length === 0 && arrObj[4294967295] === 100; ;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js
new file mode 100644
index 000000000..a943525f1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-185",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 (15.4.5.1 step 4.a)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 4294967296, {
+ value: 100
+ });
+
+ return arrObj.hasOwnProperty("4294967296") && arrObj.length === 0 && arrObj[4294967296] === 100;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js
new file mode 100644
index 000000000..a032b372d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-186",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 + 1 (15.4.5.1 step 4.a)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 4294967297, {
+ value: 100
+ });
+
+ return arrObj.hasOwnProperty("4294967297") && arrObj.length === 0 && arrObj[4294967297] === 100;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js
new file mode 100644
index 000000000..cac7efd05
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-187",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is not thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' is less than value of the length property (15.4.5.1 step 4.b)",
+
+ test: function testcase() {
+ var arrObj = [1, 2, 3];
+
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, 1, {
+ value: "abc"
+ });
+
+ return true;
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js
new file mode 100644
index 000000000..5765ea988
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-188",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' equals to value of the length property (15.4.5.1 step 4.b)",
+
+ test: function testcase() {
+ var arrObj = [1, 2, 3];
+
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, 3, {
+ value: "abc"
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js
new file mode 100644
index 000000000..c7e9e4240
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-189",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' is greater than value of the length property (15.4.5.1 step 4.b)",
+
+ test: function testcase() {
+ var arrObj = [1, 2, 3];
+
+ Object.defineProperty(arrObj, "length", {
+ writable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, 4, {
+ value: "abc"
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js
new file mode 100644
index 000000000..4069a632d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 11.a.i
+of [[DefineOwnProperty]] permits setting a setter (if absent).
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-19",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js",
+
+description: "Object.defineProperty permits setting a setter (if absent) of non-configurable accessor properties(8.12.9 step 10.a.ii.1)",
+
+test: function testcase() {
+ var o = {};
+
+ // create an accessor property; all other attributes default to false.
+ // dummy getter
+ var getter = function () { return 1;}
+ var d1 = { get: getter };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, trying to set the setter should succeed even though [[Configurable]]
+ // on the original property will be false.
+ var desc = { set: undefined };
+ Object.defineProperty(o, "foo", desc);
+
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (d2.get === getter &&
+ d2.set === undefined &&
+ d2.configurable === false &&
+ d2.enumerable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js
new file mode 100644
index 000000000..f6f901cce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-190",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property, test TypeError is thrown on updating the configurable attribute from false to true (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ Object.defineProperty(arrObj, 0, {
+ value: "ownDataProperty",
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, 0, {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arrObj, "0", "ownDataProperty", false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js
new file mode 100644
index 000000000..825efc2f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-191",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is an inherited data property, test that defining own index named property is successful (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Array.prototype, "0", {
+ value: 11,
+ configurable: true
+ });
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ configurable: false
+ });
+ return arrObj.hasOwnProperty("0") && Array.prototype[0] === 11 && typeof arrObj[0] === "undefined";
+ } finally {
+ delete Array.prototype[0];
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js
new file mode 100644
index 000000000..ce09be936
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-192",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property that overrides an inherited data property, test TypeError is thrown on updating the [[Configurable]] attribute from false to true (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Array.prototype, "0", {
+ value: 11,
+ configurable: true
+ });
+
+ var arrObj = [];
+ Object.defineProperty(arrObj, "0", {
+ value: 12,
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js
new file mode 100644
index 000000000..b3b79beed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-193",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property that overrides an inherited accessor property, test TypeError is thrown when update the [[Configurable]] attribute to true and value of [[Configurable]] attribute of original is false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Array.prototype, "0", {
+ get: function () {
+ return 11;
+ },
+ configurable: true
+ });
+
+ var arrObj = [];
+ Object.defineProperty(arrObj, "0", {
+ value: 12,
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js
new file mode 100644
index 000000000..86f7375fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-194",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property, test TypeError is thrown on updating the configurable attribute from false to true (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var getFunc = function () {
+ return 11;
+ };
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "0", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js
new file mode 100644
index 000000000..b27772d2d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-195",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is an inherited accessor property (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Array.prototype, "0", {
+ get: function () {
+ return 11;
+ },
+ configurable: true
+ });
+
+ var arrObj = [];
+
+ function getFunc() {
+ return arrObj.helpVerifySet;
+ }
+ function setFunc(value) {
+ arrObj.helpVerifySet = value;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+
+ arrObj[0] = 13;
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "helpVerifySet", false, false);
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js
new file mode 100644
index 000000000..95113728f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-196",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property that overrides an inherited data property (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Array.prototype, "0", {
+ value: 11,
+ configurable: true
+ });
+
+ var arrObj = [];
+ Object.defineProperty(arrObj, "0", {
+ get: function () { },
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js
new file mode 100644
index 000000000..ae3726d02
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-197",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property that overrides an inherited accessor property (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Array.prototype, "0", {
+ get: function () { },
+ configurable: true
+ });
+
+ var arrObj = [];
+ Object.defineProperty(arrObj, "0", {
+ get: function () { },
+ configurable: false
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js
new file mode 100644
index 000000000..5938d9b97
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-198",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test TypeError is thrown when 'O' is not extensible (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ Object.preventExtensions(arrObj);
+
+ try {
+ var desc = { value: 1 };
+ Object.defineProperty(arrObj, "0", desc);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && (arrObj.hasOwnProperty("0") === false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.preventExtensions);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js
new file mode 100644
index 000000000..9f45bd735
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-199",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test 'name' is defined as data property when 'desc' is generic descriptor (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ enumerable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js
new file mode 100644
index 000000000..ac53f6617
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For newly defined data properties, attributes
+missing from desc should have values set to the defaults from 8.6.1.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js",
+
+description: "Object.defineProperty sets missing attributes to their default values (data properties)(8.12.9 step 4.a.i)",
+
+test: function testcase() {
+ var o = {};
+
+ var desc = { value: 1 };
+ Object.defineProperty(o, "foo", desc);
+
+ var propDesc = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (propDesc.value === 1 && // this is the value that was set
+ propDesc.writable === false && // false by default
+ propDesc.enumerable === false && // false by default
+ propDesc.configurable === false) { // false by default
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js
new file mode 100644
index 000000000..b885a7082
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 11.a.ii
+of [[DefineOwnProperty]] rejects changing the getter if present.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-20",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js",
+
+description: "Object.defineProperty throws TypeError when changing getter (if present) of non-configurable accessor properties(8.12.9 step 11.a.ii)",
+
+test: function testcase() {
+ var o = {};
+
+ // create an accessor property; all other attributes default to false.
+ // dummy getter/setter
+ var getter = function () { return 1;}
+ var d1 = { get: getter, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, trying to change the setter should fail, since [[Configurable]]
+ // on the original property will be false.
+ var desc = { get: undefined };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (d2.get === getter &&
+ d2.configurable === false &&
+ d2.enumerable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js
new file mode 100644
index 000000000..9025788a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-200",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test [[Value]] of 'name' property of 'Attributes' is set as undefined if [[Value]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js
new file mode 100644
index 000000000..e887bed2f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-201",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Writable]] is absent in data descriptor 'desc', test [[Writable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ value: 1001,
+ enumerable: true,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js
new file mode 100644
index 000000000..01117e375
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-202",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Enumerable]] is absent in data descriptor 'desc', test [[Enumerable]] of property 'name' is set to false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ value: 1001,
+ writable: true,
+ configurable: true
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js
new file mode 100644
index 000000000..ea3d3b77a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-203",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Configurable]] is absent in data descriptor 'desc', test [[Configurable]] of property 'name' is set to false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ value: 1001,
+ writable: true,
+ enumerable: true
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js
new file mode 100644
index 000000000..f1a3f2323
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-204",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'desc' is data descriptor, test updating all attribute values of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [1]; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(arrObj, "0", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js
new file mode 100644
index 000000000..5477282e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-205",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Get]] is absent in accessor descriptor 'desc', test [[Get]] attribute of property 'name' is set to undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var setFunc = function (value) {
+ arrObj.setVerifyHelpProp = value;
+ };
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js
new file mode 100644
index 000000000..1af2294dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-206",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test [[Set]] of 'name' property in 'Attributes' is set as undefined if [[Set]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var getFunc = function () { };
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(arrObj, "0");
+
+ return arrObj.hasOwnProperty("0") && desc.hasOwnProperty("set") && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js
new file mode 100644
index 000000000..eb5c8cec9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-207",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Enumerable]] is absent in accessor descriptor 'desc', test [[Enumerable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ var setFunc = function (value) {
+ arrObj.setVerifyHelpProp = value;
+ };
+ var getFunc = function () { };
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc,
+ get: getFunc,
+ configurable: true
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js
new file mode 100644
index 000000000..e668cb950
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-208",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Configurable]] is absent in accessor descriptor 'desc', test [[Configurable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var setFunc = function (value) {
+ arrObj.setVerifyHelpProp = value;
+ };
+ var getFunc = function () { };
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc,
+ get: getFunc,
+ enumerable: true
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js
new file mode 100644
index 000000000..23e2bf0b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-209",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'desc' is accessor descriptor, test updating all attribute values of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var setFunc = function (value) {
+ arrObj.setVerifyHelpProp = value;
+ };
+ var getFunc = function () {
+ return 14;
+ };
+
+ Object.defineProperty(arrObj, "0", {
+ get: function () {
+ return 11;
+ },
+ set: function () { },
+ configurable: true,
+ enumerable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false,
+ enumerable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js
new file mode 100644
index 000000000..3757d5f0e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For non-configurable properties, step 11.a.ii
+of [[DefineOwnProperty]] permits setting a getter if absent.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-21",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js",
+
+description: "Object.defineProperty permits setting a getter (if absent) of non-configurable accessor properties(8.12.9 step 11.a.ii)",
+
+test: function testcase() {
+ var o = {};
+
+ // create an accessor property; all other attributes default to false.
+ // dummy setter
+ var setter = function (x) {}
+ var d1 = { set: setter };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, trying to set the getter should succeed even though [[Configurable]]
+ // on the original property will be false. Existing values of need to be preserved.
+ var getter = undefined;
+ var desc = { get: getter };
+
+ Object.defineProperty(o, "foo", desc);
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (d2.get === getter &&
+ d2.set === setter &&
+ d2.configurable === false &&
+ d2.enumerable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js
new file mode 100644
index 000000000..3d31994a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-210",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if every field in 'desc' is absent (name is data property) (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ arrObj[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(arrObj, "0", {});
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 101, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js
new file mode 100644
index 000000000..fee67cddf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-211",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if every field in 'desc' is absent(name is accessor property) (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ function getFunc() {
+ return 11;
+ }
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {});
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js
new file mode 100644
index 000000000..882da28a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-212",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'name'(desc is data property) (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ arrObj[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(arrObj, "0", {
+ value: 100,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js
new file mode 100644
index 000000000..00ef4d953
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-213",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'name'(desc is accessor property) (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var getFunc = function () {
+ return "100";
+ };
+ var setFunc = function (value) {
+ arrObj.setVerifyHelpProp = value;
+ };
+
+ var desc = {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ };
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", desc);
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js
new file mode 100644
index 000000000..a0374592e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-214",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property and its configurable and writable attributes are set to false, test TypeError is thrown when the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 0, {
+ value: 101,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "0", { value: "abc" });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js
new file mode 100644
index 000000000..8b7be44a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-215",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: undefined });
+
+ Object.defineProperty(arrObj, "0", { value: undefined });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js
new file mode 100644
index 000000000..1b8aa9447
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-216",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are null (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: null });
+
+ Object.defineProperty(arrObj, "0", { value: null });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", null, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js
new file mode 100644
index 000000000..8db71d237
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-217",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are NaN (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: NaN });
+
+ Object.defineProperty(arrObj, "0", { value: NaN });
+
+ var hasProperty = arrObj.hasOwnProperty("0");
+ var verifyValue = (arrObj[0] !== arrObj[0]);
+
+ var verifyWritable = false;
+ arrObj[0] = 1001;
+ verifyWritable = arrObj[0] !== 1001 && arrObj[0] !== arrObj[0];
+
+ var verifyEnumerable = false;
+ for (var p in arrObj) {
+ if (p === "0") {
+ verifyEnumerable = true;
+ }
+ }
+
+ var verifyConfigurable = false;
+ delete arrObj[0];
+ verifyConfigurable = arrObj.hasOwnProperty("0");
+
+ return hasProperty && verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js
new file mode 100644
index 000000000..4df542bf3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-218",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: -0 });
+
+ try {
+ Object.defineProperty(arrObj, "0", { value: +0 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", -0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js
new file mode 100644
index 000000000..7341a2d79
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-219",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c)",
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: +0 });
+
+ try {
+ Object.defineProperty(arrObj, "0", { value: -0 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", +0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js
new file mode 100644
index 000000000..75b03e2a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-22",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js",
+
+ description: "Object.defineProperty - 'name' is existing own data property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "foo", {
+ value: 11,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ value: 12,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.foo === 11;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js
new file mode 100644
index 000000000..80e6a6894
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-220",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with same vaule (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: 101 });
+
+ Object.defineProperty(arrObj, "0", { value: 101 });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js
new file mode 100644
index 000000000..af4fb3673
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-221",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 0, {
+ value: 101,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "0", { value: 123 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js
new file mode 100644
index 000000000..124b2386c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-222",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings which have same length and same characters in corresponding positions (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: "abcd" });
+
+ Object.defineProperty(arrObj, "0", { value: "abcd" });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js
new file mode 100644
index 000000000..99eea66d2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-223",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 0, {
+ value: "abcd",
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "0", { value: "fghj" });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js
new file mode 100644
index 000000000..a5093e9e4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-224",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { value: true });
+
+ Object.defineProperty(arrObj, "0", { value: true });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js
new file mode 100644
index 000000000..727f5b59b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-225",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, 0, {
+ value: true,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "0", { value: false });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js
new file mode 100644
index 000000000..169ad5c2d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-226",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ var obj1 = { length: 10 };
+
+ Object.defineProperty(arrObj, "0", { value: obj1 });
+
+ Object.defineProperty(arrObj, "0", { value: obj1 });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js
new file mode 100644
index 000000000..78d677c32
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-227",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to two different objects (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ var obj1 = { length: 10 };
+ Object.defineProperty(arrObj, 0, {
+ value: obj1,
+ writable: false,
+ configurable: false
+ });
+
+ var obj2 = { length: 20 };
+
+ try {
+ Object.defineProperty(arrObj, "0", { value: obj2 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js
new file mode 100644
index 000000000..27a5f341a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-228",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Writable]] field of 'desc' and the [[Writable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { writable: false });
+
+ Object.defineProperty(arrObj, "0", { writable: false });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js
new file mode 100644
index 000000000..3ba5068e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-229",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Writable]] field of 'desc' and the [[Writable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { writable: false, configurable: true });
+
+ Object.defineProperty(arrObj, "0", { writable: true });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js
new file mode 100644
index 000000000..5839214da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-23",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js",
+
+ description: "Object.defineProperty - 'name' is existing an inherited data property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "foo", {
+ value: 11,
+ configurable: false
+ });
+
+ var ConstructFun = function () {};
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return obj.hasOwnProperty("foo") && (typeof obj.foo) === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js
new file mode 100644
index 000000000..5b332fcd9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-230",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ arrObj.helpVerifySet = 10;
+
+ function getFunc() {
+ return arrObj.helpVerifySet;
+ }
+ function setFunc(value) {
+ arrObj.helpVerifySet = value;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, setFunc, "helpVerifySet", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js
new file mode 100644
index 000000000..2015f672c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-231",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ arrObj.helpVerifySet = 10;
+
+ function getFunc1() {
+ return 20;
+ }
+ function getFunc2() {
+ return arrObj.helpVerifySet;
+ }
+ function setFunc(value) {
+ arrObj.helpVerifySet = value;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc1,
+ set: setFunc,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc2
+ });
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc2, setFunc, "helpVerifySet", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js
new file mode 100644
index 000000000..68600f1d6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-232",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "0", { set: setFunc });
+
+ Object.defineProperty(arrObj, "0", { set: setFunc });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js
new file mode 100644
index 000000000..d3a0471ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-233",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ function setFunc1() { }
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc1,
+ configurable: true
+ });
+
+ function setFunc2(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "0", { set: setFunc2 });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc2, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js
new file mode 100644
index 000000000..16f8f72cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-234",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Enumerable]] field of 'desc' and the [[Enumerable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { enumerable: false });
+
+ Object.defineProperty(arrObj, "0", { enumerable: false });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js
new file mode 100644
index 000000000..4abef6141
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-235",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Enumerable]] field of 'desc' and the [[Enumerable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { enumerable: false, configurable: true });
+
+ Object.defineProperty(arrObj, "0", { enumerable: true });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js
new file mode 100644
index 000000000..034ec0c5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-236",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Configurable]] field of 'desc' and the [[Configurable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { configurable: false });
+
+ Object.defineProperty(arrObj, "0", { configurable: false });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js
new file mode 100644
index 000000000..0f1822534
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-237",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Configurable]] field of 'desc' and the [[Configurable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", { configurable: true });
+
+ Object.defineProperty(arrObj, "0", { configurable: false });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js
new file mode 100644
index 000000000..0dd577b48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-238",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if the [[Configurable]] attribute value of 'name' is false and the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: 3,
+ writable: true,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ value: 13,
+ writable: true,
+ configurable: true
+ });
+ return false;
+
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js
new file mode 100644
index 000000000..a4c0f9d93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-239",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if the [[Configurable]] attribute value of 'name' is false, and [[Enumerable]] of 'desc' is present and its value is different from the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: 3,
+ writable: true,
+ configurable: false,
+ enumerable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ value: 13,
+ writable: true,
+ enumerable: true
+ });
+ return false;
+
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js
new file mode 100644
index 000000000..0d529e6c3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-24",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js",
+
+ description: "Object.defineProperty - 'name' is own data property that overrides an inherited data property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "foo", {
+ value: 12,
+ configurable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+ Object.defineProperty(obj, "foo", {
+ value: 11,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.foo === 11;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js
new file mode 100644
index 000000000..1c971bf7e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-240",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if 'name' is accessor property, and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "1", {
+ set: setFunc,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ value: 13
+ });
+ return false;
+
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js
new file mode 100644
index 000000000..c14f0a68d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-241",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if 'name' is data property, and'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: 3,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ set: function () { }
+ });
+ return false;
+
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js
new file mode 100644
index 000000000..279d333fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-242-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is updated successfully (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [3];
+
+ Object.defineProperty(arrObj, "0", {
+ value: 1001,
+ writable: false,
+ enumerable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js
new file mode 100644
index 000000000..e1224bf28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-242",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is converted from data property to accessor property (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [3];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js
new file mode 100644
index 000000000..4b71d3b23
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-243-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and assignment to the accessor property, fails to convert accessor property from accessor property to data property (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function getFunc() {
+ return 3;
+ }
+ Object.defineProperty(arrObj, "1", {
+ get: getFunc,
+ configurable: true
+ });
+
+ arrObj[1] = 4;
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, undefined, undefined, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js
new file mode 100644
index 000000000..93d5501ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-243",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is converted from accessor property to data property (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function getFunc() {
+ return 3;
+ }
+ Object.defineProperty(arrObj, "1", {
+ get: getFunc,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "1", {
+ value: 12
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js
new file mode 100644
index 000000000..26b6b0d62
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-244",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false and the [[Writable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ writable: false,
+ configurable: false
+ });
+
+ try {
+
+ Object.defineProperty(arrObj, "1", {
+ writable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", undefined, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js
new file mode 100644
index 000000000..c6ca5070a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-245",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: 3,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+
+ Object.defineProperty(arrObj, "1", {
+ value: "abc"
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js
new file mode 100644
index 000000000..8838b7041
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-246",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: -0
+
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ value: +0
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", -0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js
new file mode 100644
index 000000000..5ebed0b89
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-247",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: +0
+ });
+
+ try {
+
+ Object.defineProperty(arrObj, "1", {
+ value: -0
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", +0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js
new file mode 100644
index 000000000..4b32e7d75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-248",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with different vaules (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: 12
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ value: 15
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js
new file mode 100644
index 000000000..092e2bbb3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-249",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: "abc"
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ value: "fgh"
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", "abc", false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js
new file mode 100644
index 000000000..1171f3b1f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-25",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js",
+
+ description: "Object.defineProperty - 'data' is own data property that overrides an inherited accessor property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "foo", {
+ get: function () { },
+ configurable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+ Object.defineProperty(obj, "foo", {
+ value: 11,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.foo === 11;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js
new file mode 100644
index 000000000..8ffb3ecee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-250",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ value: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ value: true
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", false, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js
new file mode 100644
index 000000000..452458f36
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-251",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ var obj = { length: 10 };
+
+ Object.defineProperty(arrObj, "1", {
+ value: obj
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", { value: {} });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "1", obj, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js
new file mode 100644
index 000000000..7e44b20f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-252",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "1", {
+ set: setFunc
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ set: function () { }
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js
new file mode 100644
index 000000000..b248c7d39
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-253",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' is an object and the [[Set]] attribute value of 'name' is undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ function getFunc() {
+ return 12;
+ }
+
+ Object.defineProperty(arrObj, "1", {
+ get: getFunc,
+ set: undefined
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ set: function () { }
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, undefined, undefined, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js
new file mode 100644
index 000000000..2b4adbeb1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-254",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is not thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "1", {
+ set: undefined
+ });
+ var hasProperty = arrObj.hasOwnProperty("1");
+
+ Object.defineProperty(arrObj, "1", {
+ set: undefined
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(arrObj, "1");
+
+ var verifyGet = desc.hasOwnProperty("get") && typeof desc.get === "undefined";
+
+ var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined";
+
+ var verifyEnumerable = false;
+ for (var p in arrObj) {
+ if (p === "1") {
+ verifyEnumerable = true
+ }
+ }
+
+ var verifyConfigurable = false;
+ delete arrObj[1];
+ verifyConfigurable = arrObj.hasOwnProperty("1");
+
+ return hasProperty && verifyGet && verifySet && !verifyEnumerable && verifyConfigurable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js
new file mode 100644
index 000000000..b007c5e76
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-255",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ function getFunc() {
+ return 12;
+ }
+ Object.defineProperty(arrObj, "1", {
+ get: getFunc
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ get: function () {
+ return 14;
+ }
+ });
+
+ return false;
+ } catch (e) {
+ var hasProperty = arrObj.hasOwnProperty("1");
+ var desc = Object.getOwnPropertyDescriptor(arrObj, "1");
+
+ var verifyGet = arrObj[1] === getFunc();
+
+ var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined";
+
+ var verifyEnumerable = false;
+ for (var p in arrObj) {
+ if (p === "1") {
+ verifyEnumerable = true
+ }
+ }
+
+ var verifyConfigurable = false;
+ delete arrObj[1];
+ verifyConfigurable = arrObj.hasOwnProperty("1");
+
+ return e instanceof TypeError && hasProperty && verifyGet &&
+ verifySet && !verifyEnumerable && verifyConfigurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js
new file mode 100644
index 000000000..7610fdb8e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-256",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' is an object and the [[Get]] attribute value of 'name' is undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ function getFunc() {
+ return 12;
+ }
+
+ Object.defineProperty(arrObj, "1", {
+ get: getFunc
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ get: undefined
+ });
+ return false;
+ } catch (e) {
+ var hasProperty = arrObj.hasOwnProperty("1");
+ var desc = Object.getOwnPropertyDescriptor(arrObj, "1");
+
+ var verifyGet = arrObj[1] === getFunc();
+
+ var verifySet = desc.hasOwnProperty("set") && typeof desc.set === "undefined";
+
+ var verifyEnumerable = false;
+ for (var p in arrObj) {
+ if (p === "1") {
+ verifyEnumerable = true
+ }
+ }
+
+ var verifyConfigurable = false;
+ delete arrObj[1];
+ verifyConfigurable = arrObj.hasOwnProperty("1");
+
+ return e instanceof TypeError && hasProperty && verifyGet &&
+ verifySet && !verifyEnumerable && verifyConfigurable;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js
new file mode 100644
index 000000000..b84e3c53e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-257",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is not thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+ var arrObj = [];
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "1", {
+ get: undefined,
+ set: setFunc,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "1", {
+ get: undefined
+ });
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "1", undefined, setFunc, "setVerifyHelpProp", false, false);
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js
new file mode 100644
index 000000000..b1d2944a8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-258",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [100];
+
+ Object.defineProperty(arrObj, "0", {
+ value: 200
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 200, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js
new file mode 100644
index 000000000..4e7032fb3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-259",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'name' as undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [100];
+
+ Object.defineProperty(arrObj, "0", {
+ value: undefined
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js
new file mode 100644
index 000000000..2a7061fab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-26",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js",
+
+ description: "Object.defineProperty - 'name' is own accessor property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return 11;
+ },
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return 12;
+ },
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.property === 11;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js
new file mode 100644
index 000000000..1a4744b32
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-260",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'name' from undefined to number (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [undefined];
+ Object.defineProperty(arrObj, "0", {
+ value: 100
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js
new file mode 100644
index 000000000..9b9ba31c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-261",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Writable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [100];
+ Object.defineProperty(arrObj, "0", {
+ writable: false
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js
new file mode 100644
index 000000000..65f4cbd97
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-262",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [100];
+
+ Object.defineProperty(arrObj, "0", {
+ enumerable: false
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js
new file mode 100644
index 000000000..532a69907
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-263",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Configurable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [100];
+
+ Object.defineProperty(arrObj, "0", {
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js
new file mode 100644
index 000000000..59495d9c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-264",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [100];
+ Object.defineProperty(arrObj, "0", {
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js
new file mode 100644
index 000000000..32e731e03
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-265",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function getFunc() {
+ return 100;
+ }
+ Object.defineProperty(arrObj, "0", {
+ get: function () {
+ return 12;
+ },
+ configurable: true
+ });
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js
new file mode 100644
index 000000000..2464364bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-266",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test setting the [[Get]] attribute value of 'name' as undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ function getFunc() {
+ return 12;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ get: undefined
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, undefined, undefined, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js
new file mode 100644
index 000000000..eaa895242
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-267",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'name' from undefined to function object (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function getFunc() {
+ return 12;
+ }
+ Object.defineProperty(arrObj, "0", {
+ get: undefined,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ get: getFunc
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", getFunc, undefined, undefined, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js
new file mode 100644
index 000000000..07b348025
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-268",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "0", {
+ set: function () { },
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js
new file mode 100644
index 000000000..68d1e8be7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-269",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test setting the [[Set]] attribute value of 'name' as undefined (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "0", {
+ set: function () { },
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ set: undefined
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, undefined, undefined, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js
new file mode 100644
index 000000000..c073e8fd9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-27",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js",
+
+ description: "Object.defineProperty - 'name' is an inherited accessor property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "property", {
+ get: function () {
+ return 11;
+ },
+ configurable: false
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return 12;
+ },
+ configurable: true
+ });
+ return obj.hasOwnProperty("property") && obj.property === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js
new file mode 100644
index 000000000..bf5963080
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-270",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'name' from undefined to function object (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ set: undefined,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js
new file mode 100644
index 000000000..230a9ed55
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-271",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ enumerable: false
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js
new file mode 100644
index 000000000..957093f8b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-272",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Configurable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "0", {
+ set: setFunc,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "0", {
+ configurable: false
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "0", undefined, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js
new file mode 100644
index 000000000..e4b004ea6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-273",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 4.c)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ function getFunc() {
+ return 12;
+ }
+ Object.defineProperty(arrObj, "1", {
+ get: function () {
+ return 6;
+ },
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(arrObj, "1", {
+ get: getFunc,
+ enumerable: false,
+ configurable: false
+ });
+ return accessorPropertyAttributesAreCorrect(arrObj, "1", getFunc, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js
new file mode 100644
index 000000000..24246f0fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-274",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is not changed if ToUint32('name') is less than value of the length property in 'O' (15.4.5.1 step 4.e)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false
+
+ Object.defineProperty(arrObj, "1", {
+ value: 14
+ });
+
+ return arrObj.length === 3 && arrObj[1] === 14;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js
new file mode 100644
index 000000000..57fba45ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-275",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is set as ToUint32('name') + 1 if ToUint32('name') equals to value of the length property in 'O' (15.4.5.1 step 4.e.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+ arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false
+
+ Object.defineProperty(arrObj, "3", {
+ value: 3
+ });
+
+ return arrObj.length === 4 && arrObj[3] === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js
new file mode 100644
index 000000000..ee4234d4e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-276",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is set as ToUint32('name') + 1 if ToUint32('name') is greater than value of the length property in 'O' (15.4.5.1 step 4.e.ii)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "5", {
+ value: 3
+ });
+
+ return arrObj.length === 6 && arrObj[5] === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js
new file mode 100644
index 000000000..f59e17f7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-277",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic property that won't exist on 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "property", {
+ value: 12,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "property", 12, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js
new file mode 100644
index 000000000..8e2561483
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-278",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js",
+
+ description: "Object.defineProperty - 'name' is generic property that won't exist on 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function getFunc() {
+ return 12;
+ }
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(arrObj, "property", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js
new file mode 100644
index 000000000..7f3aa4e75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-279",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function getFunc() {
+ return 12;
+ }
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "property", {
+ get: function () {
+ return 24;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(arrObj, "property", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js
new file mode 100644
index 000000000..5be58a3d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-28",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js",
+
+ description: "Object.defineProperty - 'name' is own accessor property that overrides an inherited data property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "foo", {
+ value: 11,
+ configurable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+ Object.defineProperty(obj, "foo", {
+ get: function () { },
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js
new file mode 100644
index 000000000..17a705772
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-280",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ arrObj.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(arrObj, "property", {
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js
new file mode 100644
index 000000000..3b0415487
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-281",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and non-configurable (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "property", {
+ value: 12
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ value: 36
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js
new file mode 100644
index 000000000..9d9bee90e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-282",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "property", {
+ writable: false
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ writable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", undefined, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js
new file mode 100644
index 000000000..921eac2cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-283",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "property", {
+ value: 12,
+ enumerable: false
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ enumerable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js
new file mode 100644
index 000000000..137758a4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-284",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "property", {
+ value: 12
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js
new file mode 100644
index 000000000..19fa70bc1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-285",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function getFunc() {
+ return 12;
+ }
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "property", {
+ get: getFunc,
+ set: setFunc
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ get: function () {
+ return 36;
+ }
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js
new file mode 100644
index 000000000..09492f6a4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-286",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test TypeError is thrown when updating the [[Set]] attribute value of 'name' (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "property", {
+ set: setFunc
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ set: function () {}
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js
new file mode 100644
index 000000000..c3cca6312
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-287",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "property", {
+ set: setFunc,
+ enumerable: false
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ enumerable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js
new file mode 100644
index 000000000..4eaf09e03
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-288",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js",
+
+ description: "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+
+ test: function testcase() {
+
+ var arrObj = [];
+
+ function setFunc(value) {
+ arrObj.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arrObj, "property", {
+ set: setFunc,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arrObj, "property", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, "property", undefined, setFunc, "setVerifyHelpProp", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js
new file mode 100644
index 000000000..ba03a1ace
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-289-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property which is defined in both [[ParameterMap]] of 'O' and 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ delete arguments[0];
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var verifyFormal = a === 0;
+ return dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true) && verifyFormal;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js
new file mode 100644
index 000000000..35c56b045
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-289",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own property of 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ delete arguments[0];
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true);
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js
new file mode 100644
index 000000000..c6ff9e8eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-29",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js",
+
+ description: "Object.defineProperty - 'name' is own accessor property that overrides an inherited accessor property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "foo", {
+ get: function () { },
+ configurable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+ Object.defineProperty(obj, "foo", {
+ get: function () { },
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js
new file mode 100644
index 000000000..cb649a23f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-290-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property which is defined in both [[ParameterMap]] of 'O' and 'O', is deleted afterwards, and 'desc' is accessor descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ delete arguments[0];
+ function getFunc() {
+ return 10;
+ }
+ function setFunc(value) {
+ this.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ var verifyFormal = a === 0;
+ return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", true, true) && verifyFormal;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js
new file mode 100644
index 000000000..8af9685c5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-290",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own property of 'O', and is deleted afterwards, and 'desc' is accessor descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ delete arguments[0];
+ function getFunc() {
+ return 10;
+ }
+ function setFunc(value) {
+ this.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", true, true);
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js
new file mode 100644
index 000000000..56356a5a1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-291-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3 and 5.a.i)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function getFunc1() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc1,
+ enumerable: true,
+ configurable: true
+ });
+ function getFunc2() {
+ return 20;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc2,
+ enumerable: false,
+ configurable: false
+ });
+ var verifyFormal = a === 0;
+ return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false) && verifyFormal;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js
new file mode 100644
index 000000000..5a206a539
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-291",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc1() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc1,
+ enumerable: true,
+ configurable: true
+ });
+ function getFunc2() {
+ return 20;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc2,
+ enumerable: false,
+ configurable: false
+ });
+ return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false);
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js
new file mode 100644
index 000000000..d67017645
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-292-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3 and 5.b)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "0", {
+ value: 20,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var verifyFormal = a === 20;
+ return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false) && verifyFormal;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js
new file mode 100644
index 000000000..f85cb9064
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-292",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 20,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false);
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js
new file mode 100644
index 000000000..3fbadf0a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-293-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is not thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and configurable (10.6 [[DefineOwnProperty]] step 3 and 5b)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false
+ });
+ Object.defineProperty(arguments, "0", {
+ value: 20
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true);
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js
new file mode 100644
index 000000000..b6cdaae20
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-293-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as unwritable and non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ value: 20
+ });
+ } catch (e) {
+ var verifyFormal = a === 10;
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js
new file mode 100644
index 000000000..2685186b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-293-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is not thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and configurable (10.6 [[DefineOwnProperty]] step 3 and step 5.b)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ });
+ Object.defineProperty(arguments, "0", {
+ value: 20
+ });
+ var verifyFormal = a === 10;
+ return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true) && verifyFormal;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js
new file mode 100644
index 000000000..8631745e0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-293",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and non-configurable (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ value: 20
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js
new file mode 100644
index 000000000..fa2928844
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-294-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and 5b)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ writable: true
+ });
+ } catch (e) {
+ var verifyFormal = a === 10;
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js
new file mode 100644
index 000000000..c4f8f6207
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-294",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ writable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js
new file mode 100644
index 000000000..74d80fef5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-295-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ enumerable: false
+ });
+ } catch (e) {
+ var verifyFormal = a === 10;
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js
new file mode 100644
index 000000000..f6dad7792
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-295",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ enumerable: false
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js
new file mode 100644
index 000000000..40a5d62fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-296-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ configurable: true
+ });
+ } catch (e) {
+ var verifyFormal = a === 10;
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js
new file mode 100644
index 000000000..9cfbc32b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-296",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js
new file mode 100644
index 000000000..e74515449
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-297-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5a)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function getFunc1() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc1,
+ enumerable: false,
+ configurable: false
+ });
+ function getFunc2() {
+ return 20;
+ }
+ try {
+ Object.defineProperty(arguments, "0", {
+ get: getFunc2
+ });
+ } catch (e) {
+ var verifyFormal = a === 0;
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js
new file mode 100644
index 000000000..0477a0c7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-297",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc1() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc1,
+ enumerable: false,
+ configurable: false
+ });
+ function getFunc2() {
+ return 20;
+ }
+ try {
+ Object.defineProperty(arguments, "0", {
+ get: getFunc2
+ });
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js
new file mode 100644
index 000000000..187ec1228
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-298-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] steps 4 and 5a)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function getFunc() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ function setFunc(value) {
+ this.setVerifyHelpProp = value;
+ }
+ try {
+ Object.defineProperty(arguments, "0", {
+ set: setFunc
+ });
+ } catch (e) {
+ var verifyFormal = a === 0;
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js
new file mode 100644
index 000000000..f55d9a98f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-298",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ function setFunc(value) {
+ this.setVerifyHelpProp = value;
+ }
+ try {
+ Object.defineProperty(arguments, "0", {
+ set: setFunc
+ });
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js
new file mode 100644
index 000000000..97f10a9eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-299-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] steps 4 and 5a)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function getFunc() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ enumerable: false
+ });
+ } catch (e) {
+ var verifyFormal = a === 0;
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js
new file mode 100644
index 000000000..31cfd2143
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-299",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ enumerable: false
+ });
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js
new file mode 100644
index 000000000..3ec572fd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For newly defined accessor properties, attributes
+missing from desc should have values set to the defaults from 8.6.1.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-3",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js",
+
+description: "Object.defineProperty sets missing attributes to their default values (accessor)(8.12.9 step 4.b.i)",
+
+test: function testcase() {
+ var o = {};
+
+ var getter = function () { return 1; };
+ var desc = { get: getter };
+
+ Object.defineProperty(o, "foo", desc);
+
+ var propDesc = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (typeof(propDesc.get) === "function" && // the getter must be the function that was provided
+ propDesc.get === getter &&
+ propDesc.enumerable === false && // false by default
+ propDesc.configurable === false) { // false by default
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js
new file mode 100644
index 000000000..50eb759b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-30",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js",
+
+ description: "Object.defineProperty - 'name' is own accessor property without a get function (8.12.9 step 1)",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "foo", {
+ set: function () { },
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js
new file mode 100644
index 000000000..d16992e8f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-300-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5a)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function getFunc() {
+ return 0;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ configurable: true
+ });
+ } catch (e) {
+ var verifyFormal = a === 0;
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false) && verifyFormal;
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js
new file mode 100644
index 000000000..a4d36319b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-300",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false);
+ }
+ return false;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js
new file mode 100644
index 000000000..043670f04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-301-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is an index named property of 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ delete arguments[0];
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var verifyFormal = a === 0;
+ return dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false) && verifyFormal;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js
new file mode 100644
index 000000000..69ebfce82
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-301",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an array index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ delete arguments[0];
+ Object.defineProperty(arguments, "0", {
+ value: 10,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js
new file mode 100644
index 000000000..0c7febd5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-302-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is an index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3 and step 5a)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ delete arguments[0];
+ function getFunc() {
+ return 10;
+ }
+ function setFunc(value) {
+ this.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ var verifyFormal = a === 0;
+ return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", false, false) && verifyFormal;
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&
+ fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js
new file mode 100644
index 000000000..12d70217a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-302",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ delete arguments[0];
+ function getFunc() {
+ return 10;
+ }
+ function setFunc(value) {
+ this.setVerifyHelpProp = value;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", false, false);
+ }(0, 1, 2));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js
new file mode 100644
index 000000000..a659185cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-303",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc1() {
+ return 10;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc1,
+ enumerable: true,
+ configurable: true
+ });
+ function getFunc2() {
+ return 20;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc2,
+ enumerable: false,
+ configurable: false
+ });
+ return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc2, undefined, undefined, false, false);
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js
new file mode 100644
index 000000000..4a3bd7775
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-304",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 20,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false);
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js
new file mode 100644
index 000000000..ccd6be031
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-305",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 0,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arguments, "0", {
+ value: 10
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false);
+ }
+ return false;
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js
new file mode 100644
index 000000000..bdabc0731
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-306",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 0,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ writable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false);
+ }
+ return false;
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js
new file mode 100644
index 000000000..cf25a3c44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-307",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 0,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ enumerable: false
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, true, false);
+ }
+ return false;
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js
new file mode 100644
index 000000000..bbdeb5024
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-308",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "0", {
+ value: 0,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false);
+ }
+ return false;
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js
new file mode 100644
index 000000000..eb337c828
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-309",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc1() {
+ return 0;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc1,
+ enumerable: false,
+ configurable: false
+ });
+ function getFunc2() {
+ return 10;
+ }
+ try {
+ Object.defineProperty(arguments, "0", {
+ get: getFunc2
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc1, undefined, undefined, false, false);
+ }
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js
new file mode 100644
index 000000000..4b52b143f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-31",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js",
+
+ description: "Object.defineProperty - 'name' is own accessor property without a get function that overrides an inherited accessor property(8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "foo", {
+ get: function () { },
+ configurable: true
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+ Object.defineProperty(obj, "foo", {
+ set: function () { },
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js
new file mode 100644
index 000000000..949794f72
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-310",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return 0;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ function setFunc(value) {
+ this.setVerifyHelpProp = value;
+ }
+ try {
+ Object.defineProperty(arguments, "0", {
+ set: setFunc
+ });
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, false, false);
+ }
+ return false;
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js
new file mode 100644
index 000000000..57609da8e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-311",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return 0;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ enumerable: false
+ });
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false);
+ }
+ return false;
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js
new file mode 100644
index 000000000..e9eaa6ad7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-312",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return 0;
+ }
+ Object.defineProperty(arguments, "0", {
+ get: getFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "0", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, undefined, undefined, true, false);
+ }
+ return false;
+ }());
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js
new file mode 100644
index 000000000..f2a80cb89
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-313-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true);
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js
new file mode 100644
index 000000000..bed4a79f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-313",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is generic property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true);
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js
new file mode 100644
index 000000000..99044e885
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-314-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function getFunc() {
+ return "getFunctionString";
+ }
+ function setFunc(value) {
+ this.testgetFunction = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", true, true);
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js
new file mode 100644
index 000000000..2e7e9ada2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-314",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is generic property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return "getFunctionString";
+ }
+ function setFunc(value) {
+ this.testgetFunction = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", true, true);
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js
new file mode 100644
index 000000000..89b118ea8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-315-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "genericProperty", {
+ get: function () {
+ return 1001;
+ },
+ set: function (value) {
+ this.testgetFunction1 = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ function getFunc() {
+ return "getFunctionString";
+ }
+ function setFunc(value) {
+ this.testgetFunction = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ var verifyFormal = c === 3;
+ return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", false, false) && verifyFormal;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js
new file mode 100644
index 000000000..49fe083c1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-315",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "genericProperty", {
+ get: function () {
+ return 1001;
+ },
+ set: function (value) {
+ this.testgetFunction1 = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ function getFunc() {
+ return "getFunctionString";
+ }
+ function setFunc(value) {
+ this.testgetFunction = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ return accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "testgetFunction", false, false);
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js
new file mode 100644
index 000000000..4c06f74c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-316-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1002,
+ enumerable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false);
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js
new file mode 100644
index 000000000..82aef86e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-316",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1002,
+ enumerable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false);
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js
new file mode 100644
index 000000000..535996e8b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-317-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1001,
+ writable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1002
+ });
+ } catch (e) {
+ var verifyFormal = b === 2;
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false) && verifyFormal;
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js
new file mode 100644
index 000000000..4cae94c91
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-317",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1001,
+ writable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ value: 1002
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js
new file mode 100644
index 000000000..c86b792a4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-318-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "genericProperty", {
+ writable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ writable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js
new file mode 100644
index 000000000..0edce1e13
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-318",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "genericProperty", {
+ writable: false,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ writable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js
new file mode 100644
index 000000000..a890a3342
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-319-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "genericProperty", {
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ enumerable: false
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js
new file mode 100644
index 000000000..7beae1f55
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-319",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "genericProperty", {
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ enumerable: false
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js
new file mode 100644
index 000000000..3945cee32
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-32",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js",
+
+ description: "Object.defineProperty - 'name' is an inherited accessor property without a get function (8.12.9 step 1)",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "foo", {
+ set: function () { },
+ configurable: false
+ });
+
+ var ConstructFun = function () { };
+ ConstructFun.prototype = proto;
+ var obj = new ConstructFun();
+
+ Object.defineProperty(obj, "foo", {
+ configurable: true
+ });
+ return obj.hasOwnProperty("foo") && typeof obj.foo === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js
new file mode 100644
index 000000000..e511bb530
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-320-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ Object.defineProperty(arguments, "genericProperty", {
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js
new file mode 100644
index 000000000..918ebe4de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-320",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ Object.defineProperty(arguments, "genericProperty", {
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js
new file mode 100644
index 000000000..fc1bf0b9c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-321-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function getFunc() {
+ return "genericPropertyString";
+ }
+ function setFunc(value) {
+ this.helpVerifyGet = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ get: function () {
+ return "overideGenericPropertyString";
+ }
+ });
+ } catch (e) {
+ var verifyFormal = a === 1;
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "helpVerifyGet", false, false, false) && verifyFormal;
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js
new file mode 100644
index 000000000..dd8c5d33c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-321",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function getFunc() {
+ return "genericPropertyString";
+ }
+ function setFunc(value) {
+ this.helpVerifyGet = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ get: function () {
+ return "overideGenericPropertyString";
+ }
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", getFunc, setFunc, "helpVerifyGet", false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js
new file mode 100644
index 000000000..e94c9d86b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-322-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function setFunc(value) {
+ this.genericPropertyString = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ set: setFunc,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ set: function (value) {
+ this.genericPropertyString1 = value;
+ }
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js
new file mode 100644
index 000000000..19490d389
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-322",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function setFunc(value) {
+ this.genericPropertyString = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ set: setFunc,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ set: function (value) {
+ this.genericPropertyString1 = value;
+ }
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js
new file mode 100644
index 000000000..3a5923020
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-323-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js",
+
+ description: "Object.defineProperty - ''O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function setFunc(value) {
+ this.genericPropertyString = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ enumerable: false
+ });
+ } catch (e) {
+ verifyFormal = c === 3;
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", true, false) && verifyFormal;
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js
new file mode 100644
index 000000000..1ce266f17
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-323",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js",
+
+ description: "Object.defineProperty - ''O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function setFunc(value) {
+ this.genericPropertyString = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ enumerable: false
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", true, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js
new file mode 100644
index 000000000..f5e9b1d75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-324-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function (a, b, c) {
+ function setFunc(value) {
+ this.genericPropertyString = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ set: setFunc,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js
new file mode 100644
index 000000000..bc94d742a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-324",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+
+ test: function testcase() {
+ return (function () {
+ function setFunc(value) {
+ this.genericPropertyString = value;
+ }
+ Object.defineProperty(arguments, "genericProperty", {
+ set: setFunc,
+ configurable: false
+ });
+ try {
+ Object.defineProperty(arguments, "genericProperty", {
+ configurable: true
+ });
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, setFunc, "genericPropertyString", false, false, false);
+ }
+ return false;
+ }(1, 2, 3));
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js
new file mode 100644
index 000000000..f7dde75bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-325-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object which created with function take formal parameters, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i)",
+
+ test: function testcase() {
+ var argObj = (function (a, b, c) { return arguments; })(1, 2, 3);
+ var accessed = false;
+
+ Object.defineProperty(argObj, 0, {
+ get: function () {
+ accessed = true;
+ return 12;
+ }
+ });
+
+ return argObj[0] === 12 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js
new file mode 100644
index 000000000..7d69f2847
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-325",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i)",
+
+ test: function testcase() {
+ var argObj = (function () { return arguments; })(1, 2, 3);
+ var accessed = false;
+
+ Object.defineProperty(argObj, 0, {
+ get: function () {
+ accessed = true;
+ return 12;
+ }
+ });
+
+ return argObj[0] === 12 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects();
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js
new file mode 100644
index 000000000..7e961ce5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-326",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is writable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js
new file mode 100644
index 000000000..ab2b3eb2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-327",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var property in obj) {
+ if (property === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js
new file mode 100644
index 000000000..1a67bbb66
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-328",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && !afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js
new file mode 100644
index 000000000..702896c52
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-329",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js",
+
+ description: "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ writable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js
new file mode 100644
index 000000000..c1d1dd003
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-33",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js",
+
+ description: "Object.defineProperty - 'O' is a Function object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var fun = function () { };
+
+ Object.defineProperty(fun, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(fun, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && fun.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js
new file mode 100644
index 000000000..2425d5029
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-330",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js",
+
+ description: "ES5 Attributes - success to update [[enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js
new file mode 100644
index 000000000..93a80c59c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-331",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js
new file mode 100644
index 000000000..28404eb23
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-332",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js",
+
+ description: "ES5 Attributes - success to update the data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ function getFunc() {
+ return 20;
+ }
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("value") && desc2.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js
new file mode 100644
index 000000000..7e9ffc97c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-333-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js",
+
+ description: "ES5 Attributes - indexed data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object",
+
+ test: function testcase() {
+ var obj = (function () {
+ return arguments;
+ }());
+
+ Object.defineProperty(obj, "0", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var verifyValue = (obj[0] === 2010);
+ obj[0] = 1001;
+
+ return verifyValue && obj[0] === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js
new file mode 100644
index 000000000..32b11449e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-333-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js",
+
+ description: "ES5 Attributes - named data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object",
+
+ test: function testcase() {
+ var obj = (function () {
+ return arguments;
+ }());
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var verifyValue = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return verifyValue && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js
new file mode 100644
index 000000000..fff9f196b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-333-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute of indexed property 'P'successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Arguments object (8.12.9 - step 10)",
+
+ test: function testcase() {
+
+ var obj = (function () {
+ return arguments;
+ }());
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: true,
+ configurable: false
+ });
+
+ Object.defineProperty(obj, "0", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js
new file mode 100644
index 000000000..f2cbdc3b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-333-9",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js",
+
+ description: "Object.defineProperty - Named property 'P' with attributes [[Writable]]: true, [[Enumerable]]:true, [[Configurable]]:false is writable using simple assignment, 'A' is an Array Object",
+
+ test: function testcase() {
+ var obj = [];
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var verifyValue = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return verifyValue && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js
new file mode 100644
index 000000000..858e05eab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-333",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is writable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js
new file mode 100644
index 000000000..deb78804b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-334",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js
new file mode 100644
index 000000000..336477d22
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-335",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && obj.prop === 2010 && afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js
new file mode 100644
index 000000000..6b2a7baa6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-336",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js",
+
+ description: "ES5 Attributes - Success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ writable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js
new file mode 100644
index 000000000..0302626b9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-337",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js
new file mode 100644
index 000000000..25f66e2e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-338",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js
new file mode 100644
index 000000000..cfaad1977
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-339",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js",
+
+ description: "ES5 Attributes - fail to update the data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ function getFunc() {
+ return 20;
+ }
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js
new file mode 100644
index 000000000..e44c5e405
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-34",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js",
+
+ description: "Object.defineProperty - 'O' is an Array object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var arrObj = [];
+
+ Object.defineProperty(arrObj, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(arrObj, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && arrObj.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js
new file mode 100644
index 000000000..f3b4b19c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-340",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is writable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js
new file mode 100644
index 000000000..72c1bc876
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-341",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js
new file mode 100644
index 000000000..ddbea1134
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-342",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && !afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js
new file mode 100644
index 000000000..7afa68729
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-343",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js",
+
+ description: "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ writable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js
new file mode 100644
index 000000000..723fea49b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-344",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js
new file mode 100644
index 000000000..af77089fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-345",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js
new file mode 100644
index 000000000..1c20bdaf0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-346",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js",
+
+ description: "ES5 Attributes - success to update the data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ function getFunc() {
+ return 20;
+ }
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js
new file mode 100644
index 000000000..a9ccaf405
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-347",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is writable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js
new file mode 100644
index 000000000..53289a1b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-348",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js
new file mode 100644
index 000000000..350fe10e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-349",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && obj.prop === 2010 && afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js
new file mode 100644
index 000000000..caa9cb23f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-35",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js",
+
+ description: "Object.defineProperty - 'O' is a String object which implements its own [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var str = new String("abc");
+
+ Object.defineProperty(str, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(str, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && str.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js
new file mode 100644
index 000000000..74c873936
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-350",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js",
+
+ description: "ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ writable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js
new file mode 100644
index 000000000..4cf8e8da5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-351",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js
new file mode 100644
index 000000000..94c841991
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-352",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js
new file mode 100644
index 000000000..777cd046b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-353",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js",
+
+ description: "ES5 Attributes - fail to update the data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: true,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ function getFunc() {
+ return 20;
+ }
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js
new file mode 100644
index 000000000..7b85f7fdf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Object object (8.12.9 step - Note)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "property", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js
new file mode 100644
index 000000000..5508c71aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Object object (8.12.9 step - Note)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js
new file mode 100644
index 000000000..d2819ce34
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-11",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'A' is an Array object (8.12.9 step - Note)",
+
+ test: function testcase() {
+
+ var obj = [];
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "prop", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "prop", 1002, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js
new file mode 100644
index 000000000..dd7e4259b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-12",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute of indexed property successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Arguments object (8.12.9 - step Note)",
+
+ test: function testcase() {
+
+ var obj = (function () {
+ return arguments;
+ }());
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-14.js
new file mode 100644
index 000000000..3daa413bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-14.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-14",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-14.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute of indexed property successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is the document host object (8.12.9 - step Note)",
+
+ test: function testcase() {
+
+ var obj = document;
+
+ try {
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true);
+ } finally {
+ delete obj[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js
new file mode 100644
index 000000000..f99f3ea75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-15",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js",
+
+ description: "Object.defineProperty - Named property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'A' is an Array object",
+
+ test: function testcase() {
+ var obj = [];
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var verifyValue = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return verifyValue && obj.prop === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js
new file mode 100644
index 000000000..38df9bb03
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-16",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js",
+
+ description: "ES5 Attributes - property 'P' is an indexed data property with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]] : true) is non-writable using simple assignment, 'O' is an Arguments object",
+
+ test: function testcase() {
+ var obj = (function () {
+ return arguments;
+ }());
+
+ Object.defineProperty(obj, "0", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var valueVerify = (obj[0] === 2010);
+ obj[0] = 1001;
+
+ return valueVerify && obj[0] === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js
new file mode 100644
index 000000000..931a79a8b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'A' is an Array object (8.12.9 step - Note)",
+
+ test: function testcase() {
+
+ var obj = [];
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1002, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js
new file mode 100644
index 000000000..0b996feb6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Arguments object (8.12.9 - step Note)",
+
+ test: function testcase() {
+
+ var obj = (function () {
+ return arguments;
+ }());
+
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "property", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js
new file mode 100644
index 000000000..292955957
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is the window host object (8.12.9 - step Note)",
+
+ test: function testcase() {
+
+ var obj = window;
+
+ try {
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "property", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true);
+ } finally {
+ delete obj.property;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-5.js
new file mode 100644
index 000000000..1b8f2e96c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-5.js",
+
+ description: "Object.defineProperty will update [[Value]] attribute successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is the document host object (8.12.9 - step Note)",
+
+ test: function testcase() {
+
+ var obj = document;
+
+ try {
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ writable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "property", {
+ value: 1002
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "property", 1002, false, false, true);
+ } finally {
+ delete obj.property;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js
new file mode 100644
index 000000000..2c0577e94
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js",
+
+ description: "Object.defineProperty - Indexed property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'A' is an Array object",
+
+ test: function testcase() {
+ var obj = [];
+
+ Object.defineProperty(obj, "0", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var verifyValue = (obj[0] === 2010);
+ obj[0] = 1001;
+
+ return verifyValue && obj[0] === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js
new file mode 100644
index 000000000..fe2fa3c4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-7",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js",
+
+ description: "ES5 Attributes - property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]] : true) is non-writable using simple assignment, 'O' is an Arguments object",
+
+ test: function testcase() {
+ var obj = (function () {
+ return arguments;
+ }());
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var valueVerify = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return valueVerify && obj.prop === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js
new file mode 100644
index 000000000..cff93f807
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js",
+
+ description: "ES5 Attributes - property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'O' is the window host object",
+
+ test: function testcase() {
+ var obj = window;
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var valueVerify = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return valueVerify && obj.prop === 2010;
+ } finally {
+ delete obj.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-9.js
new file mode 100644
index 000000000..c452f2152
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354-9",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-9.js",
+
+ description: "ES5 Attributes - property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'O' is the document host object",
+
+ test: function testcase() {
+ var obj = document;
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var valueVerify = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return valueVerify && obj.prop === 2010;
+ } finally {
+ delete obj.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js
new file mode 100644
index 000000000..5bc03b0c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-354",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is unwritable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js
new file mode 100644
index 000000000..26f60beb5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-355",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var property in obj) {
+ if (property === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js
new file mode 100644
index 000000000..379c64194
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-356",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && !afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js
new file mode 100644
index 000000000..ede3a02e3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-357",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js",
+
+ description: "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ writable: true
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js
new file mode 100644
index 000000000..ffc621352
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-358",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js
new file mode 100644
index 000000000..67fc8a212
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-359",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js
new file mode 100644
index 000000000..65b69686b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-36",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js",
+
+ description: "Object.defineProperty - 'O' is a Boolean object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var obj = new Boolean(true);
+
+ Object.defineProperty(obj, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js
new file mode 100644
index 000000000..fc523e55b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-360",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js",
+
+ description: "ES5 Attributes - success to update the data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ function getFunc() {
+ return 20;
+ }
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("value") && desc2.hasOwnProperty("get");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js
new file mode 100644
index 000000000..1347d2225
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-361",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is unwritable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js
new file mode 100644
index 000000000..90ccf1ac1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-362",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var property in obj) {
+ if (property === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js
new file mode 100644
index 000000000..f712ef2c1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-363",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && obj.prop === 2010 && afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js
new file mode 100644
index 000000000..83b6fdbb6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-364",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js",
+
+ description: "ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ try {
+ Object.defineProperty(obj, "prop", {
+ writable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js
new file mode 100644
index 000000000..37f5dd8f1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-365",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js
new file mode 100644
index 000000000..5c0dbc5c8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-366",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js
new file mode 100644
index 000000000..e67231c01
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-367",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js",
+
+ description: "ES5 Attributes - fail to update the data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: true,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ function getFunc() {
+ return 20;
+ }
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js
new file mode 100644
index 000000000..527f3e5df
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-368",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is unwritable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js
new file mode 100644
index 000000000..df4a8b572
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-369",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js
new file mode 100644
index 000000000..918fd4ca5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-37",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js",
+
+ description: "Object.defineProperty - 'O' is a Number object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var obj = new Number(-2);
+
+ Object.defineProperty(obj, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && obj.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js
new file mode 100644
index 000000000..95a35c42b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-370",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && !afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js
new file mode 100644
index 000000000..9e623abce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-371",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js",
+
+ description: "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ writable: true
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js
new file mode 100644
index 000000000..9ff06ee28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-372",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js
new file mode 100644
index 000000000..a68c09963
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-373",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js
new file mode 100644
index 000000000..3cb68543a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-374",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js",
+
+ description: "ES5 Attributes - success to update the data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ function getFunc() {
+ return 20;
+ }
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("value") && desc2.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js
new file mode 100644
index 000000000..efcb02fa1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-375",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is unwritable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = (obj.prop === 2010);
+ obj.prop = 1001;
+
+ return propertyDefineCorrect && obj.prop === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js
new file mode 100644
index 000000000..190907db9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-376",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js
new file mode 100644
index 000000000..5194bb079
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-377",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js",
+
+ description: "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var beforeDelete = obj.hasOwnProperty("prop");
+ delete obj.prop;
+ var afterDelete = obj.hasOwnProperty("prop");
+ return beforeDelete && obj.prop === 2010 && afterDelete;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js
new file mode 100644
index 000000000..b9c8913c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-378",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js",
+
+ description: "ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ writable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js
new file mode 100644
index 000000000..1fc7e5947
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-379",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js
new file mode 100644
index 000000000..b1ce693b9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-38",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js",
+
+ description: "Object.defineProperty - 'O' is the Math object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Math, "foo", {
+ value: 12,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(Math, "foo", 12, false, false, true);
+ } finally {
+ delete Math.foo;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js
new file mode 100644
index 000000000..9dab33402
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-380",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js
new file mode 100644
index 000000000..5cfeebdf7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-381",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js",
+
+ description: "ES5 Attributes - fail to update the data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to an accessor property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 2010,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ function getFunc() {
+ return 20;
+ }
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js
new file mode 100644
index 000000000..80a449904
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-382",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a number",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === 1001 && desc.value === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js
new file mode 100644
index 000000000..bd1cf6fc6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-383",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a string",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: "ThisIsAString"
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === "ThisIsAString" && desc.value === "ThisIsAString";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js
new file mode 100644
index 000000000..adda7d9a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-384",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a boolean",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: false
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === false && desc.value === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js
new file mode 100644
index 000000000..0ab958cfc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-385",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a generic object",
+
+ test: function testcase() {
+ var obj = {};
+ var tempObj = { testproperty: 100 };
+
+ Object.defineProperty(obj, "prop", {
+ value: tempObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === tempObj && desc.value === tempObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js
new file mode 100644
index 000000000..6be5b0b65
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-386",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is an Array object",
+
+ test: function testcase() {
+ var obj = {};
+ var arrObj = [];
+
+ Object.defineProperty(obj, "prop", {
+ value: arrObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === arrObj && desc.value === arrObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js
new file mode 100644
index 000000000..5c1561151
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-387",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a String object",
+
+ test: function testcase() {
+ var obj = {};
+ var strObj = new String();
+
+ Object.defineProperty(obj, "prop", {
+ value: strObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === strObj && desc.value === strObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js
new file mode 100644
index 000000000..ca289cb88
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-388",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a Number object",
+
+ test: function testcase() {
+ var obj = {};
+ var numObj = new Number();
+
+ Object.defineProperty(obj, "prop", {
+ value: numObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === numObj && desc.value === numObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js
new file mode 100644
index 000000000..78683f8c3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-389",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a Boolean Object",
+
+ test: function testcase() {
+ var obj = {};
+ var boolObj = new Boolean();
+
+ Object.defineProperty(obj, "prop", {
+ value: boolObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === boolObj && desc.value === boolObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js
new file mode 100644
index 000000000..6198de9b7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-39",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js",
+
+ description: "Object.defineProperty - 'O' is a Date object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var desc = new Date();
+
+ Object.defineProperty(desc, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(desc, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && desc.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js
new file mode 100644
index 000000000..79f50352d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-390",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a Function object",
+
+ test: function testcase() {
+ var obj = {};
+ var funObj = function () { };
+
+ Object.defineProperty(obj, "prop", {
+ value: funObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === funObj && desc.value === funObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js
new file mode 100644
index 000000000..ecfd622fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-391",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is an Error object",
+
+ test: function testcase() {
+ var obj = {};
+ var errObj = new Error();
+
+ Object.defineProperty(obj, "prop", {
+ value: errObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === errObj && desc.value === errObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js
new file mode 100644
index 000000000..efae5d72b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-392",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a Date object",
+
+ test: function testcase() {
+ var obj = {};
+ var dateObj = new Date();
+
+ Object.defineProperty(obj, "prop", {
+ value: dateObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === dateObj && desc.value === dateObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js
new file mode 100644
index 000000000..cd96857ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-393",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is a RegExp object",
+
+ test: function testcase() {
+ var obj = {};
+ var regObj = new RegExp();
+
+ Object.defineProperty(obj, "prop", {
+ value: regObj
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === regObj && desc.value === regObj;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js
new file mode 100644
index 000000000..07eddc97f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-394",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: undefined
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && typeof obj.prop === "undefined" && typeof desc.value === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js
new file mode 100644
index 000000000..cf7b73190
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-395",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is null",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: null
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === null && desc.value === null;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js
new file mode 100644
index 000000000..46b77ccf1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-396",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is NaN",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: NaN
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop !== obj.prop && desc.value !== desc.value;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js
new file mode 100644
index 000000000..a90c629ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-397",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is Infinity",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: Infinity
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === Infinity && desc.value === Infinity;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js
new file mode 100644
index 000000000..c06bcd0fa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-398",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is -Infinity",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: -Infinity
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === -Infinity && desc.value === -Infinity;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js
new file mode 100644
index 000000000..36631af9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-399",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is the window host object",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: window
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === window && desc.value === window;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js
new file mode 100644
index 000000000..6c46128ad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. For newly defined properties, step 4.a.1 of
+[[DefineOwnProperty]] creates a data property if handed a generic desc.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-4",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js",
+
+description: "Object.defineProperty defines a data property if given a generic desc(8.12.9 step 4.a.i)",
+
+test: function testcase() {
+ var o = {};
+
+ var desc = {};
+ Object.defineProperty(o, "foo", desc);
+
+ var propDesc = Object.getOwnPropertyDescriptor(o, "foo");
+ if (propDesc.value === undefined && // this is the value that was set
+ propDesc.writable === false && // false by default
+ propDesc.enumerable === false && // false by default
+ propDesc.configurable === false) { // false by default
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js
new file mode 100644
index 000000000..b23d26c31
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-40",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js",
+
+ description: "Object.defineProperty - 'O' is a RegExp object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var desc = new RegExp();
+
+ Object.defineProperty(desc, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(desc, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && desc.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-400.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-400.js
new file mode 100644
index 000000000..0680a9517
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-400.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-400",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-400.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is the document host object",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: document
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === document && desc.value === document;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-401.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-401.js
new file mode 100644
index 000000000..c647c10fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-401.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-401",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-401.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of data property is the activex host object",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ value: ActiveXObject
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.prop === ActiveXObject && desc.value === ActiveXObject;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js
new file mode 100644
index 000000000..2138ed982
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-402",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct (String instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(String.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var strObj = new String();
+
+ return !strObj.hasOwnProperty("prop") && strObj.prop === 1001;
+ } finally {
+ delete String.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js
new file mode 100644
index 000000000..23e14d2bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-403",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js",
+
+ description: "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with same name and [[Writable]] attribute is set to true (Array instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Array.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var arrObj = new Array();
+ arrObj.prop = 1002;
+
+ return arrObj.hasOwnProperty("prop") && arrObj.prop === 1002;
+ } finally {
+ delete Array.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js
new file mode 100644
index 000000000..4d7e31c05
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-404",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js",
+
+ description: "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Boolean instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Boolean.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var boolObj = new Boolean();
+
+ var verifyEnumerable = false;
+ for (var p in boolObj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !boolObj.hasOwnProperty("prop") && verifyEnumerable;
+ } finally {
+ delete Boolean.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js
new file mode 100644
index 000000000..1dc0bd6e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-405",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js",
+
+ description: "ES5 Attributes - Failed to add a property to an object when the object's object has a property with same name and [[Writable]] attribute is set to false (Number instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Number.prototype, "prop", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var numObj = new Number();
+ numObj.prop = 1002;
+
+ return !numObj.hasOwnProperty("prop") && numObj.prop === 1001;
+ } finally {
+ delete Number.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js
new file mode 100644
index 000000000..63e10751b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-406",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js",
+
+ description: "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is unenumerable (Function instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ var funObj = function () { };
+
+ var verifyEnumerable = false;
+ for (var p in funObj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !funObj.hasOwnProperty("prop") && !verifyEnumerable;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js
new file mode 100644
index 000000000..9d1e326ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-407",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct (Error Instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Error.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var errObj = new Error();
+
+ return !errObj.hasOwnProperty("prop") && errObj.prop === 1001;
+ } finally {
+ delete Error.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js
new file mode 100644
index 000000000..aee2870f1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-408",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js",
+
+ description: "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with same name and [[Writable]] attribute is set to true (Date instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Date.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var dateObj = new Date();
+ dateObj.prop = 1002;
+
+ return dateObj.hasOwnProperty("prop") && dateObj.prop === 1002;
+ } finally {
+ delete Date.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js
new file mode 100644
index 000000000..9de816a22
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-409",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js",
+
+ description: "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is enumerable (RegExp instance)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(RegExp.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ var regObj = new RegExp();
+
+ var verifyEnumerable = false;
+ for (var p in regObj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !regObj.hasOwnProperty("prop") && verifyEnumerable;
+ } finally {
+ delete RegExp.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js
new file mode 100644
index 000000000..f912e83b9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-41",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js",
+
+ description: "Object.defineProperty - 'O' is the JSON object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+
+ try {
+ Object.defineProperty(JSON, "foo", {
+ value: 12,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(JSON, "foo", 12, false, false, true);
+ } finally {
+ delete JSON.foo;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js
new file mode 100644
index 000000000..fe16319b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-410",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js",
+
+ description: "ES5 Attributes - Failed to add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to false (JSON)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Object.prototype, "prop", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ JSON.prop = 1002;
+
+ return !JSON.hasOwnProperty("prop") && JSON.prop === 1001;
+ } finally {
+ delete Object.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js
new file mode 100644
index 000000000..5edb035c2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-411",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js",
+
+ description: "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is unenumerable (Math)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Object.prototype, "prop", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+
+ var verifyEnumerable = false;
+ for (var p in Math) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !Math.hasOwnProperty("prop") && !verifyEnumerable;
+ } finally {
+ delete Object.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js
new file mode 100644
index 000000000..99d8ca4e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-412",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js",
+
+ description: "ES5 Attributes - [[Value]] field of inherited property of [[Prototype]] internal property is correct(Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ Object.defineProperty(appointment, "startTime", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(appointment, "name", {
+ value: "NAME",
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var meeting = Object.create(appointment);
+ Object.defineProperty(meeting, "conferenceCall", {
+ value: "In-person meeting",
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var teamMeeting = Object.create(meeting);
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty('conferenceCall');
+
+ return hasOwnProperty && teamMeeting.name === "NAME" &&
+ teamMeeting.startTime === 1001 &&
+ teamMeeting.conferenceCall === "In-person meeting";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.create);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js
new file mode 100644
index 000000000..4eafc1fde
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-413",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js",
+
+ description: "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to true (Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ Object.defineProperty(appointment, "startTime", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(appointment, "name", {
+ value: "NAME",
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var meeting = Object.create(appointment);
+ Object.defineProperty(meeting, "conferenceCall", {
+ value: "In-person meeting",
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var teamMeeting = Object.create(meeting);
+ teamMeeting.name = "Team Meeting";
+ var dateObj = new Date("10/31/2010 08:00");
+ teamMeeting.startTime = dateObj;
+ teamMeeting.conferenceCall = "4255551212";
+
+ var hasOwnProperty = teamMeeting.hasOwnProperty("name") &&
+ teamMeeting.hasOwnProperty("startTime") &&
+ teamMeeting.hasOwnProperty('conferenceCall');
+
+ return hasOwnProperty && teamMeeting.name === "Team Meeting" &&
+ teamMeeting.startTime === dateObj &&
+ teamMeeting.conferenceCall === "4255551212";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.create);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js
new file mode 100644
index 000000000..a2e2375a4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js
@@ -0,0 +1,80 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-414",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js",
+
+ description: "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Object.create)",
+
+ test: function testcase() {
+ var appointment = new Object();
+
+ Object.defineProperty(appointment, "startTime", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+ Object.defineProperty(appointment, "name", {
+ value: "NAME",
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var meeting = Object.create(appointment);
+ Object.defineProperty(meeting, "conferenceCall", {
+ value: "In-person meeting",
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var teamMeeting = Object.create(meeting);
+
+ var verifyTimeProp = false;
+ var verifyNameProp = false;
+ var verifyCallProp = false;
+ for (var p in teamMeeting) {
+ if (p === "startTime") {
+ verifyTimeProp = true;
+ }
+ if (p === "name") {
+ verifyNameProp = true;
+ }
+ if (p === "conferenceCall") {
+ verifyCallProp = true;
+ }
+ }
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty("conferenceCall");
+
+ return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.create);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js
new file mode 100644
index 000000000..cd69200e0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-415",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js",
+
+ description: "ES5 Attributes - Failed to add properties to an object when the object's prototype has properties with the same name and [[Writable]] set to false (Object.create)",
+
+ test: function testcase() {
+ var appointment = new Object();
+
+ Object.defineProperty(appointment, "startTime", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(appointment, "name", {
+ value: "NAME",
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+
+ var meeting = Object.create(appointment);
+ Object.defineProperty(meeting, "conferenceCall", {
+ value: "In-person meeting",
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+
+ var teamMeeting = Object.create(meeting);
+ teamMeeting.name = "Team Meeting";
+ var dateObj = new Date("10/31/2010 08:00");
+ teamMeeting.startTime = dateObj;
+ teamMeeting.conferenceCall = "4255551212";
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty('conferenceCall');
+
+ return hasOwnProperty && teamMeeting.name === "NAME" &&
+ teamMeeting.startTime === 1001 &&
+ teamMeeting.conferenceCall === "In-person meeting";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.create);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js
new file mode 100644
index 000000000..6305722d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js
@@ -0,0 +1,80 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-416",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js",
+
+ description: "ES5 Attributes - Inherited properties whose [[Enumerable]] attribute is set to false is unenumerable (Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ Object.defineProperty(appointment, "startTime", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+ Object.defineProperty(appointment, "name", {
+ value: "NAME",
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+
+ var meeting = Object.create(appointment);
+ Object.defineProperty(meeting, "conferenceCall", {
+ value: "In-person meeting",
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+
+ var teamMeeting = Object.create(meeting);
+
+ var verifyTimeProp = false;
+ var verifyNameProp = false;
+ var verifyCallProp = false;
+ for (var p in teamMeeting) {
+ if (p === "startTime") {
+ verifyTimeProp = true;
+ }
+ if (p === "name") {
+ verifyNameProp = true;
+ }
+ if (p === "conferenceCall") {
+ verifyCallProp = true;
+ }
+ }
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty("conferenceCall");
+
+ return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.create);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js
new file mode 100644
index 000000000..5777112f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-417",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js",
+
+ description: "ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct(Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+
+ return !obj.hasOwnProperty("prop") && obj.prop === 1001;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Function.prototype.bind);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js
new file mode 100644
index 000000000..4e66bc621
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-418",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js",
+
+ description: "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to true (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+ obj.prop = 1002;
+
+ return obj.hasOwnProperty("prop") && obj.prop === 1002;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Function.prototype.bind);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js
new file mode 100644
index 000000000..c48e7241d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-419",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js",
+
+ description: "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+ var verifyEnumerable = false;
+ for (var p in obj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !obj.hasOwnProperty("prop") && verifyEnumerable;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Function.prototype.bind);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js
new file mode 100644
index 000000000..1079915af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-42",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js",
+
+ description: "Object.defineProperty - 'O' is an Error object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var desc = new Error();
+
+ Object.defineProperty(desc, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(desc, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && desc.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js
new file mode 100644
index 000000000..4a0e55470
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-420",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js",
+
+ description: "ES5 Attributes - Failed to add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to false(Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+ obj.prop = 1002;
+
+ return !obj.hasOwnProperty("prop") && obj.prop === 1001;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Function.prototype.bind);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js
new file mode 100644
index 000000000..64afa0a7e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-421",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js",
+
+ description: "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is unenumerable (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+ var verifyEnumerable = false;
+ for (var p in obj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !obj.hasOwnProperty("prop") && !verifyEnumerable;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Function.prototype.bind);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js
new file mode 100644
index 000000000..e2dfb823d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-422",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js
new file mode 100644
index 000000000..5c58294c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-423",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js
new file mode 100644
index 000000000..f4484d994
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-424",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js
new file mode 100644
index 000000000..1e8788d4d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-425",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js
new file mode 100644
index 000000000..043062e59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-426",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js
new file mode 100644
index 000000000..1c015b146
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-427",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc1.set === "undefined" && desc2.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js
new file mode 100644
index 000000000..7b41569c2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-428",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js
new file mode 100644
index 000000000..222aec060
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-429",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js
new file mode 100644
index 000000000..8b9057e18
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-43",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js",
+
+ description: "Object.defineProperty - 'O' is an Arguments object which implements its own [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ var argObj = (function () { return arguments; })();
+
+ Object.defineProperty(argObj, "foo", {
+ value: 12,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(argObj, "foo", {
+ value: 11,
+ configurable: true
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && argObj.foo === 12;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js
new file mode 100644
index 000000000..19977843c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-430",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js
new file mode 100644
index 000000000..d3e81a4d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-431",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js
new file mode 100644
index 000000000..6c6e9dbf6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-432",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js
new file mode 100644
index 000000000..b73cf6905
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-433",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js
new file mode 100644
index 000000000..ddc99e976
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-434",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js
new file mode 100644
index 000000000..24fffc2bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-435",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js
new file mode 100644
index 000000000..d557f2d16
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-436",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js
new file mode 100644
index 000000000..c9ffbb3b9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-437",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js
new file mode 100644
index 000000000..bca78b8a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-438",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js
new file mode 100644
index 000000000..ec7114891
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-439",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-44.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-44.js
new file mode 100644
index 000000000..aa7ff54f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-44.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-44",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-44.js",
+
+ description: "Object.defineProperty - 'O' is the document object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(document, "foo", {
+ value: 12,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(document, "foo", 12, false, false, true);
+ } finally {
+ delete document.foo;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js
new file mode 100644
index 000000000..2f52c49be
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-440",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js
new file mode 100644
index 000000000..fdb889282
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-441",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js
new file mode 100644
index 000000000..fc13071f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-442",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js
new file mode 100644
index 000000000..0c6748017
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-443",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js
new file mode 100644
index 000000000..539edbd1e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-444",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js
new file mode 100644
index 000000000..979874451
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-445",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ obj.prop = "overrideData";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return typeof desc1.set === "undefined" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js
new file mode 100644
index 000000000..da6ab283f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-446",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js
new file mode 100644
index 000000000..88a541b05
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-447",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js
new file mode 100644
index 000000000..6cdf878e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-448",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js
new file mode 100644
index 000000000..85b4b7984
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-449",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js
new file mode 100644
index 000000000..775b99908
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-45",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js",
+
+ description: "Object.defineProperty - 'O' is the window host object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(window, "foo", {
+ value: 12,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(window, "foo", 12, false, false, true);
+ } finally {
+ delete window.foo;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js
new file mode 100644
index 000000000..e2e8d0237
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-450",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js
new file mode 100644
index 000000000..b8f42f52c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-451",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js
new file mode 100644
index 000000000..93f6b23d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-452",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js
new file mode 100644
index 000000000..e199551b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-453",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js
new file mode 100644
index 000000000..a7962f4fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-454",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js
new file mode 100644
index 000000000..f615af06b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-455",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js
new file mode 100644
index 000000000..6b89d8d19
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-456",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js
new file mode 100644
index 000000000..8930f9319
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-457",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js
new file mode 100644
index 000000000..2b9d43c04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-458",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js
new file mode 100644
index 000000000..af0d3c0ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-459",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js
new file mode 100644
index 000000000..3c7f805f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-46",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js",
+
+ description: "Object.defineProperty - 'name' is defined as data property if 'name' property doesn't exist in 'O' and 'desc' is generic descriptor (8.12.9 step 4.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ enumerable: true
+ });
+
+ var isEnumerable = false;
+ for (var item in obj) {
+ if (obj.hasOwnProperty(item) && item === "property") {
+ isEnumerable = true;
+ }
+ }
+
+ return obj.hasOwnProperty("property") && isEnumerable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js
new file mode 100644
index 000000000..889dc00dc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-460",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js
new file mode 100644
index 000000000..fba7de21e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-461",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js
new file mode 100644
index 000000000..9a2bd4c62
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-462",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js
new file mode 100644
index 000000000..30bfd7d3f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-463",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && typeof desc2.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js
new file mode 100644
index 000000000..1ff75d08c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js
@@ -0,0 +1,68 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-464",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js
new file mode 100644
index 000000000..cebb71407
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-465",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js
new file mode 100644
index 000000000..de11fb37f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-466",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js
new file mode 100644
index 000000000..58b10e514
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-467",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js
new file mode 100644
index 000000000..d0594aab4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-468",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js
new file mode 100644
index 000000000..e42e7cefa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-469",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js
new file mode 100644
index 000000000..f5dd570f9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-47",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', [[Value]] of 'name' property is set as undefined if it is absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ writable: true,
+ enumerable: true,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "property", undefined, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js
new file mode 100644
index 000000000..61540f40d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-470",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js
new file mode 100644
index 000000000..be5be629d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-471",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js
new file mode 100644
index 000000000..f9d6ac520
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-472",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js
new file mode 100644
index 000000000..75c9a1958
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-473",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js
new file mode 100644
index 000000000..1fb8756da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-474",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js
new file mode 100644
index 000000000..876b637fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-475",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js
new file mode 100644
index 000000000..0b2cdfc5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-476",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js
new file mode 100644
index 000000000..521330359
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-477",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js
new file mode 100644
index 000000000..cf41b73a0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-478",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js
new file mode 100644
index 000000000..62ca5dcc6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-479",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js
new file mode 100644
index 000000000..10cd6a2e3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-48",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Writable]] of 'name' property of 'Attributes' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ enumerable: true,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "property", 1001, false, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js
new file mode 100644
index 000000000..1bb32abbf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-480",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && typeof desc1.get === "undefined" && desc2.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js
new file mode 100644
index 000000000..4669b1079
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-481",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && typeof desc2.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js
new file mode 100644
index 000000000..f6300d305
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js
@@ -0,0 +1,68 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-482",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js
new file mode 100644
index 000000000..3c080d449
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-483",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js
new file mode 100644
index 000000000..4638f0dc2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-484",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js
new file mode 100644
index 000000000..82d2eef30
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-485",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js
new file mode 100644
index 000000000..daf872c37
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-486",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js
new file mode 100644
index 000000000..0301374c3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-487",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js
new file mode 100644
index 000000000..63e3e0041
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-488",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js",
+
+ description: "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js
new file mode 100644
index 000000000..d0f12720f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-489",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var result1 = typeof obj.prop === "undefined";
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && typeof desc1.get === "undefined" && typeof desc2.get === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js
new file mode 100644
index 000000000..39ef901cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-49",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Enumerable]] of 'name' property of 'Attributes' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ writable: true,
+ configurable: true
+ });
+ return dataPropertyAttributesAreCorrect(obj, "property", 1001, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js
new file mode 100644
index 000000000..97dcd9d1f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-490",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js
new file mode 100644
index 000000000..066662d44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-491",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js
new file mode 100644
index 000000000..f71ddaf00
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-492",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js
new file mode 100644
index 000000000..46871a7cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-493",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js
new file mode 100644
index 000000000..91c159915
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-494",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js
new file mode 100644
index 000000000..5ca104970
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-495",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js
new file mode 100644
index 000000000..2fc996522
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-496",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js
new file mode 100644
index 000000000..acd1ee52b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-497",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js
new file mode 100644
index 000000000..1dc1c5cd3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-498",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js
new file mode 100644
index 000000000..b14763c31
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-499",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ obj.prop = "overrideData";
+ return typeof desc1.set === "undefined" && desc2.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js
new file mode 100644
index 000000000..8eae83030
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js
@@ -0,0 +1,68 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. Step 6 of [[DefineOwnProperty]] returns if
+every field of desc also occurs in current and every field in desc has
+the same value as current.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-5",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js",
+
+description: "Object.defineProperty is no-op if current and desc are the same data desc",
+
+test: function testcase() {
+ function sameDataDescriptorValues(d1, d2) {
+ return (d1.value === d2.value &&
+ d1.enumerable === d2.enumerable &&
+ d1.writable === d2.writable &&
+ d1.configurable === d2.configurable);
+ }
+
+ var o = {};
+
+ // create a data valued property with the following attributes:
+ // value: 101, enumerable: true, writable: true, configurable: true
+ o["foo"] = 101;
+
+ // query for, and save, the desc. A subsequent call to defineProperty
+ // with the same desc should not disturb the property definition.
+ var d1 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ // now, redefine the property with the same descriptor
+ // the property defintion should not get disturbed.
+ var desc = { value: 101, enumerable: true, writable: true, configurable: true };
+ Object.defineProperty(o, "foo", desc);
+
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (sameDataDescriptorValues(d1, d2) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js
new file mode 100644
index 000000000..ae9614d7b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-50",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Configurable]] of 'name' property is set as false if it is absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ writable: true,
+ enumerable: true
+ });
+ return dataPropertyAttributesAreCorrect(obj, "property", 1001, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js
new file mode 100644
index 000000000..0d59ddf33
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-500",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js
new file mode 100644
index 000000000..e1d5defe8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-501",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js
new file mode 100644
index 000000000..97e8be30a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-502",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js
new file mode 100644
index 000000000..439c14246
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-503",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js
new file mode 100644
index 000000000..0d889e284
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-504",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js
new file mode 100644
index 000000000..a29c6e92b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-505",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js
new file mode 100644
index 000000000..90522a1f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-506",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js
new file mode 100644
index 000000000..6ad40fc4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-507",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js
new file mode 100644
index 000000000..366375171
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-508",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js
new file mode 100644
index 000000000..673a4e643
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-509",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js
new file mode 100644
index 000000000..498ee6f73
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-51",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js",
+
+ description: "Object.defineProperty - desc is data descriptor, test updating all attribute values of 'name' (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var obj = { "property": 1 }; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "property", {
+ value: 1001,
+ writable: false,
+ enumerable: false,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "property", 1001, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js
new file mode 100644
index 000000000..c3dbade0d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-510",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js
new file mode 100644
index 000000000..d99d1f30d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-511",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js
new file mode 100644
index 000000000..c98117f77
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-512",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js
new file mode 100644
index 000000000..10623ed9c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-513",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js
new file mode 100644
index 000000000..e35fe56c7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-514",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js
new file mode 100644
index 000000000..12acb180c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-515",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js
new file mode 100644
index 000000000..6808f174c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-516",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js
new file mode 100644
index 000000000..6f29d0261
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-517",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ obj.prop = "overrideData";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return typeof desc1.set === "undefined" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js
new file mode 100644
index 000000000..4387ac34a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-518",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js
new file mode 100644
index 000000000..7f8618e4e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-519",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js
new file mode 100644
index 000000000..72ad58eb0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-52",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js",
+
+ description: "Object.defineProperty - 'desc' is generic descriptor without any attribute, test 'name' is defined in 'obj' with all default attribute values (8.12.9 step 4.a.i)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {});
+
+ return dataPropertyAttributesAreCorrect(obj, "property", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js
new file mode 100644
index 000000000..cd037dbc6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-520",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js
new file mode 100644
index 000000000..9e655c50e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-521",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js
new file mode 100644
index 000000000..5926cbc42
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-522",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && typeof desc.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js
new file mode 100644
index 000000000..d5e379d7e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-523",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js
new file mode 100644
index 000000000..09330fc0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-524",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js
new file mode 100644
index 000000000..fac90557c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-525",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js
new file mode 100644
index 000000000..1cd3b5508
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-526",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return typeof desc1.set === "undefined" && typeof desc2.set === "undefined" && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js
new file mode 100644
index 000000000..0c8490871
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-527",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js
new file mode 100644
index 000000000..0787f745c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-528",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js
new file mode 100644
index 000000000..23a445a11
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-529",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: undefined,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js
new file mode 100644
index 000000000..89713edf9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-53",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Get]] of 'name' property is set as undefined if it is absent in accessor descriptor 'desc' (8.12.9 step 4.b)",
+
+ test: function testcase() {
+ var obj = {};
+ var setFunc = function (value) {
+ obj.setVerifyHelpProp = value;
+ };
+
+ Object.defineProperty(obj, "property", {
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "property", undefined, setFunc, "setVerifyHelpProp", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js
new file mode 100644
index 000000000..6fde78d70
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-530",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js
new file mode 100644
index 000000000..70e4d4235
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is an Object object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js
new file mode 100644
index 000000000..b880226cf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is an Object object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "0", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "0", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js
new file mode 100644
index 000000000..fbfb6b79b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-11",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'A' is an Array object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = [];
+
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction1", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js
new file mode 100644
index 000000000..e4cc4c3a0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-12",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property successfully when [[Configurable]] attribute is true, 'O' is an Arguments object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = (function () {
+ return arguments;
+ }());
+
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "0", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "0", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js
new file mode 100644
index 000000000..72adbe454
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-13",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the window host object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = window;
+ try {
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "0", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "0", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true);
+ } finally {
+ delete obj[0];
+ delete obj.verifySetFunction;
+ delete obj.verifySetFunction1;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-14.js
new file mode 100644
index 000000000..12af1cb7f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-14.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-14",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-14.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the document object (8.12.9 step 11.b)",
+
+ test: function testcase() {
+
+ var obj = document;
+ try {
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "0", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "0", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true);
+ } finally {
+ delete obj[0];
+ delete obj.verifySetFunction;
+ delete obj.verifySetFunction1;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js
new file mode 100644
index 000000000..1211182a4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'A' is an Array object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = [];
+
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "0", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "0", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction1", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js
new file mode 100644
index 000000000..988a9c6ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property successfully when [[Configurable]] attribute is true, 'O' is an Arguments object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = (function () {
+ return arguments;
+ }());
+
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js
new file mode 100644
index 000000000..e41a74e36
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the window host object (8.12.9 step 11)",
+
+ test: function testcase() {
+
+ var obj = window;
+ try {
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true);
+ } finally {
+ delete obj.property;
+ delete obj.verifySetFunction;
+ delete obj.verifySetFunction1;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-5.js
new file mode 100644
index 000000000..296657dbd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-5.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-5.js",
+
+ description: "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the document object (8.12.9 step 11.b)",
+
+ test: function testcase() {
+
+ var obj = document;
+ try {
+ obj.verifySetFunction = "data";
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return obj.verifySetFunction;
+ },
+ set: function (value) {
+ obj.verifySetFunction = value;
+ },
+ configurable: true
+ });
+
+ obj.verifySetFunction1 = "data1";
+ var getFunc = function () {
+ return obj.verifySetFunction1;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction1 = value;
+ };
+
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction1", false, true);
+ } finally {
+ delete obj.property;
+ delete obj.verifySetFunction;
+ delete obj.verifySetFunction1;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js
new file mode 100644
index 000000000..c4c9056b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-531",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js
new file mode 100644
index 000000000..b0d65faf5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-532",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js
new file mode 100644
index 000000000..fa0bf4eca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-533",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js
new file mode 100644
index 000000000..cff20020b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-534",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js
new file mode 100644
index 000000000..f3552d6e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-535",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && typeof desc2.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js
new file mode 100644
index 000000000..6de07f260
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-536",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js
new file mode 100644
index 000000000..5fae30093
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-537",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js
new file mode 100644
index 000000000..66c510462
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-538",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: true
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js
new file mode 100644
index 000000000..8e8fd3e15
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-539",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js
new file mode 100644
index 000000000..ea8c4781a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-54",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Set]] of 'name' property of 'Attributes' is set as undefined value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+
+ test: function testcase() {
+ var obj = {};
+
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return "property";
+ },
+ enumerable: false,
+ configurable: false
+ });
+
+
+ if (obj.property !== "property") {
+ return false;
+ }
+ var desc = Object.getOwnPropertyDescriptor(obj, "property");
+ if (typeof desc.set !== "undefined") {
+ return false;
+ }
+ for (var p in obj) {
+ if (p === "property") {
+ return false;
+ }
+ }
+ delete obj.property;
+ if (!obj.hasOwnProperty("property")) {
+ return false;
+ }
+
+ return true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js
new file mode 100644
index 000000000..6219cb8d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-540-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js",
+
+ description: "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named accessor property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'O' is an Object object (8.12.9 step 11.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ obj.verifySetFunction = "data";
+ var getFunc = function () {
+ return obj.verifySetFunction;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+
+ var result = false;
+ try {
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return 100;
+ }
+ });
+ } catch (e) {
+ result = e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+
+ try {
+ Object.defineProperty(obj, "property", {
+ set: function (value) {
+ obj.verifySetFunction1 = value;
+ }
+ });
+ } catch (e1) {
+ return result && e1 instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js
new file mode 100644
index 000000000..94d523857
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-540-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js",
+
+ description: "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named accessor property 'P' whose [[Configurable]] attribute is false, 'O' is an Arguments object (8.12.9 step 11.a)",
+
+ test: function testcase() {
+ var obj = (function () {
+ return arguments;
+ }());
+
+ obj.verifySetFunction = "data";
+ var getFunc = function () {
+ return obj.verifySetFunction;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+
+ var result = false;
+ try {
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return 100;
+ }
+ });
+ } catch (e) {
+ result = e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+
+ try {
+ Object.defineProperty(obj, "property", {
+ set: function (value) {
+ obj.verifySetFunction1 = value;
+ }
+ });
+ } catch (e1) {
+ return result && e1 instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js
new file mode 100644
index 000000000..cb043e06d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-540-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js",
+
+ description: "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed accessor property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'O' is an Object object (8.12.9 step 11.a)",
+
+ test: function testcase() {
+ var obj = {};
+
+ obj.verifySetFunction = "data";
+ var getFunc = function () {
+ return obj.verifySetFunction;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+
+ var result = false;
+ try {
+ Object.defineProperty(obj, "0", {
+ get: function () {
+ return 100;
+ }
+ });
+ } catch (e) {
+ result = e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+
+ try {
+ Object.defineProperty(obj, "0", {
+ set: function (value) {
+ obj.verifySetFunction1 = value;
+ }
+ });
+ } catch (e1) {
+ return result && e1 instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js
new file mode 100644
index 000000000..10afee0d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-540-7",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js",
+
+ description: "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'A' is an Array object (8.12.9 step 11.a)",
+
+ test: function testcase() {
+ var obj = [];
+
+ obj.verifySetFunction = "data";
+ var getFunc = function () {
+ return obj.verifySetFunction;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+
+ var result = false;
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 100;
+ }
+ });
+ } catch (e) {
+ result = e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: function (value) {
+ obj.verifySetFunction1 = value;
+ }
+ });
+ } catch (e1) {
+ return result && e1 instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "prop", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js
new file mode 100644
index 000000000..77288d60f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-540-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js",
+
+ description: "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed accessor property 'P' whose [[Configurable]] attribute is false, 'O' is an Arguments object (8.12.9 step 11.a)",
+
+ test: function testcase() {
+ var obj = (function () {
+ return arguments;
+ }());
+
+ obj.verifySetFunction = "data";
+ var getFunc = function () {
+ return obj.verifySetFunction;
+ };
+ var setFunc = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+
+ var result = false;
+ try {
+ Object.defineProperty(obj, "0", {
+ get: function () {
+ return 100;
+ }
+ });
+ } catch (e) {
+ result = e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+
+ try {
+ Object.defineProperty(obj, "0", {
+ set: function (value) {
+ obj.verifySetFunction1 = value;
+ }
+ });
+ } catch (e1) {
+ return result && e1 instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "0", getFunc, setFunc, "verifySetFunction", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js
new file mode 100644
index 000000000..6ffedb3ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-540",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js
new file mode 100644
index 000000000..8b9ba3e86
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-541",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return propertyDefineCorrect && desc.enumerable === true;
+ }
+ }
+
+ return false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js
new file mode 100644
index 000000000..aaaae6b25
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-542",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js
new file mode 100644
index 000000000..c61380059
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-543",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js
new file mode 100644
index 000000000..2d968d833
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-544",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js
new file mode 100644
index 000000000..971b0972f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js
@@ -0,0 +1,76 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-545",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: false
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js
new file mode 100644
index 000000000..1a6e2d1a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-546",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js
new file mode 100644
index 000000000..c978d5304
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-547",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: true,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js
new file mode 100644
index 000000000..8c0253760
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-548",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js
new file mode 100644
index 000000000..824e57ba3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-549",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js
new file mode 100644
index 000000000..7ff6e29b9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-55",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Enumerable]] of 'name' property of 'Attributes' is set as false value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var setFunc = function (value) {
+ obj.setVerifyHelpProp = value;
+ };
+ var getFunc = function () {
+ return 10;
+ };
+
+ Object.defineProperty(obj, "property", {
+ set: setFunc,
+ get: getFunc,
+ configurable: true
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js
new file mode 100644
index 000000000..6e3b17a43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-550",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js
new file mode 100644
index 000000000..e8bbd12d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-551",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js
new file mode 100644
index 000000000..92b5663ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-552",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js",
+
+ description: "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ var result2 = typeof obj.prop === "undefined";
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && typeof desc2.get === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js
new file mode 100644
index 000000000..706cfde44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-553",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js",
+
+ description: "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && typeof desc2.set === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js
new file mode 100644
index 000000000..cff96f570
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js
@@ -0,0 +1,72 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-554",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js",
+
+ description: "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js
new file mode 100644
index 000000000..c97aca4a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-555",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js",
+
+ description: "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ configurable: false
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js
new file mode 100644
index 000000000..40d618829
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-556",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js",
+
+ description: "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: true
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && desc2.hasOwnProperty("value");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js
new file mode 100644
index 000000000..8882ec375
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-557",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js",
+
+ description: "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js
new file mode 100644
index 000000000..729ae0870
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-558",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js",
+
+ description: "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ obj.prop = "overrideData";
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === "overrideData";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js
new file mode 100644
index 000000000..9bc3af19c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-559",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is unenumerable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ for (var p in obj) {
+ if (p === "prop") {
+ return false;
+ }
+ }
+
+ return propertyDefineCorrect && desc.enumerable === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js
new file mode 100644
index 000000000..526417e94
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-56",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js",
+
+ description: "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Configurable]] of 'name' property is set as false if it is absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+
+ test: function testcase() {
+ var obj = {};
+ var setFunc = function (value) {
+ obj.setVerifyHelpProp = value;
+ };
+ var getFunc = function () {
+ return 10;
+ };
+
+ Object.defineProperty(obj, "property", {
+ set: setFunc,
+ get: getFunc,
+ enumerable: true
+ });
+ return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js
new file mode 100644
index 000000000..be68a80e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-560",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js",
+
+ description: "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var propertyDefineCorrect = obj.hasOwnProperty("prop");
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ delete obj.prop;
+
+ return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty("prop");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js
new file mode 100644
index 000000000..caa055a44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-561",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js",
+
+ description: "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var result1 = obj.prop === 1001;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ get: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = obj.prop === 1001;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js
new file mode 100644
index 000000000..6b1dd3b9c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-562",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js",
+
+ description: "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ set: undefined
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js
new file mode 100644
index 000000000..96dbbbade
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js
@@ -0,0 +1,76 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-563",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js",
+
+ description: "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ var result1 = false;
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p1 in obj) {
+ if (p1 === "prop") {
+ result1 = true;
+ }
+ }
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ enumerable: true
+ });
+
+ return false;
+ } catch (e) {
+ var result2 = false;
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ for (var p2 in obj) {
+ if (p2 === "prop") {
+ result2 = true;
+ }
+ }
+
+ return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js
new file mode 100644
index 000000000..3b03099f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-564",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js",
+
+ description: "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ configurable: true
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+ delete obj.prop;
+
+ return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty("prop") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js
new file mode 100644
index 000000000..95684b461
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-565",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js",
+
+ description: "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+
+ test: function testcase() {
+ var obj = {};
+
+ var getFunc = function () {
+ return 1001;
+ };
+
+ var verifySetFunc = "data";
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc,
+ set: setFunc,
+ enumerable: false,
+ configurable: false
+ });
+ var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ try {
+ Object.defineProperty(obj, "prop", {
+ value: 1001
+ });
+
+ return false;
+ } catch (e) {
+ var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return desc1.hasOwnProperty("get") && !desc2.hasOwnProperty("value") && e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js
new file mode 100644
index 000000000..25f732295
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-566",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js",
+
+ description: "ES5 Attributes - [[Get]] attribute is a function which has zero argument",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function () {
+ return 2010;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js
new file mode 100644
index 000000000..d0e08a389
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-567",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js",
+
+ description: "ES5 Attributes - [[Get]] attribute is a function which has one argument",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function (arg1) {
+ return 2010;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js
new file mode 100644
index 000000000..eee9fc0ad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-568",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js",
+
+ description: "ES5 Attributes - [[Get]] attribute is a function which has two arguments",
+
+ test: function testcase() {
+ var obj = {};
+ var getFunc = function (arg1, arg2) {
+ return 2010;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && obj.prop === 2010 && desc.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js
new file mode 100644
index 000000000..0177b65f1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-569",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js",
+
+ description: "ES5 Attributes - [[Get]] attribute is a function which contains global variable",
+
+ test: function testcase() {
+ var obj = {};
+ var globalVariable = 20;
+ var getFunc = function () {
+ globalVariable = 2010;
+ return globalVariable;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && desc.get === getFunc && obj.prop === 2010 && globalVariable === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js
new file mode 100644
index 000000000..1849339e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-57",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js",
+
+ description: "Object.defineProperty - 'desc' is accessor descriptor, test updating all attribute values of 'name' (8.12.9 step 4.b.i)",
+
+ test: function testcase() {
+ var obj = {};
+ var setFunc = function (value) {
+ obj.setVerifyHelpProp = value;
+ };
+ var getFunc = function () {
+ return 14;
+ };
+
+ Object.defineProperty(obj, "property", {
+ get: function () {
+ return 11;
+ },
+ set: function (value) { },
+ configurable: true,
+ enumerable: true
+ });
+
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false,
+ enumerable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "property", getFunc, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js
new file mode 100644
index 000000000..09a036c46
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-570",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js",
+
+ description: "ES5 Attributes - [[Get]] attribute is a function which doesn't contains return statement",
+
+ test: function testcase() {
+ var obj = {};
+ var verifyExecute = false;
+ var getFunc = function () {
+ verifyExecute = true;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+ var tempVariable = obj.prop;
+
+ return obj.hasOwnProperty("prop") && desc.get === getFunc && verifyExecute && typeof obj.prop === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js
new file mode 100644
index 000000000..c6c1cebd6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-571",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js",
+
+ description: "ES5 Attributes - [[Get]] attribute is a function which involves 'this' object into statement(s)",
+
+ test: function testcase() {
+ var obj = {
+ len: 2010
+ };
+ var getFunc = function () {
+ return this;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ get: getFunc
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && obj.prop === obj && desc.get === getFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js
new file mode 100644
index 000000000..81fa0e978
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-572",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js",
+
+ description: "ES5 Attributes - [[Set]] attribute is a function which has zero argument",
+
+ test: function testcase() {
+ var obj = {};
+
+ var setFunc = function () { };
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && desc.set === setFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js
new file mode 100644
index 000000000..feafe6fec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-573",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573",
+
+ description: "ES5 Attributes - [[Set]] attribute is a function which has one argument",
+
+ test: function testcase() {
+ var obj = {};
+
+ var verifySetFunc = 20;
+ var setFunc = function (value) {
+ verifySetFunc = value;
+ };
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+ obj.prop = 2010;
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && desc.set === setFunc && verifySetFunc === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js
new file mode 100644
index 000000000..b33eea344
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-574",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574",
+
+ description: "ES5 Attributes - [[Set]] attribute is a function which has two arguments",
+
+ test: function testcase() {
+ var obj = {};
+ var firstArg = 12;
+ var secondArg = 12;
+
+ var setFunc = function (a, b) {
+ firstArg = a;
+ secondArg = b;
+ };
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+ obj.prop = 100;
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && desc.set === setFunc && firstArg === 100 && typeof secondArg === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js
new file mode 100644
index 000000000..f5c5b0dd7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-575",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js",
+
+ description: "ES5 Attributes - [[Set]] attribute is a function which contains global variable",
+
+ test: function testcase() {
+ var obj = {};
+ var globalVariable = 20;
+ var setFunc = function () {
+ globalVariable = 2010;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+ obj.prop = 10;
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && desc.set === setFunc && globalVariable === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js
new file mode 100644
index 000000000..c98930b37
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-576",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js",
+
+ description: "ES5 Attributes - [[Set]] attribute is a function which contains return statement",
+
+ test: function testcase() {
+ var obj = {};
+
+ var setFunc = function () {
+ return 2010;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && desc.set === setFunc;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js
new file mode 100644
index 000000000..3d075f899
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-577",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js",
+
+ description: "ES5 Attributes - [[Set]] attribute is a function which involves 'this' object into statement(s)",
+
+ test: function testcase() {
+ var obj = {};
+
+ var setFunc = function (value) {
+ this.len = value;
+ };
+
+ Object.defineProperty(obj, "prop", {
+ set: setFunc
+ });
+ obj.prop = 2010;
+
+ var desc = Object.getOwnPropertyDescriptor(obj, "prop");
+
+ return obj.hasOwnProperty("prop") && desc.set === setFunc && obj.len === 2010;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js
new file mode 100644
index 000000000..8565c49e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-578",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js",
+
+ description: "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (String instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(String.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var strObj = new String();
+
+ return !strObj.hasOwnProperty("prop") && strObj.prop === "data";
+ } finally {
+ delete String.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js
new file mode 100644
index 000000000..d9a5f8045
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-579",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js",
+
+ description: "ES5 Attributes - Success to add property into object (Array instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Array.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var arrObj = new Array();
+ arrObj.prop = "myOwnProperty";
+
+ return !arrObj.hasOwnProperty("prop") && arrObj.prop === "myOwnProperty" && data === "myOwnProperty";
+ } finally {
+ delete Array.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js
new file mode 100644
index 000000000..4f47fa73a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-58",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js",
+
+ description: "Object.defineProperty - 'name' is data descriptor and every fields in 'desc' is absent (8.12.9 step 5)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", {});
+ return dataPropertyAttributesAreCorrect(obj, "foo", 101, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js
new file mode 100644
index 000000000..8ff5e4a1a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-580",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js",
+
+ description: "ES5 Attributes - Inherited property is enumerable (Boolean instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Boolean.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var boolObj = new Boolean();
+ var verifyEnumerable = false;
+ for (var p in boolObj) {
+ if(p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !boolObj.hasOwnProperty("prop") && verifyEnumerable;
+ } finally {
+ delete Boolean.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js
new file mode 100644
index 000000000..74b7e339a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-581",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js",
+
+ description: "ES5 Attributes - Fail to add property into object (Number instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Number.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ var numObj = new Number();
+ numObj.prop = "myOwnProperty";
+
+ return !numObj.hasOwnProperty("prop") && numObj.prop === "data" && data === "data";
+ } finally {
+ delete Number.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js
new file mode 100644
index 000000000..bb60766a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-582",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js",
+
+ description: "ES5 Attributes - Inherited property is non-enumerable (Function instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ var funObj = function () { };
+ var verifyEnumerable = false;
+ for (var p in funObj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !funObj.hasOwnProperty("prop") && !verifyEnumerable;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js
new file mode 100644
index 000000000..68030af59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-583",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js",
+
+ description: "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Error Instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Error.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var errObj = new Error();
+
+ return !errObj.hasOwnProperty("prop") && errObj.prop === "data";
+ } finally {
+ delete Error.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js
new file mode 100644
index 000000000..7d18652ed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-584",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js",
+
+ description: "ES5 Attributes - Failed to add property into object (Date instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Date.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var dateObj = new Date();
+ dateObj.prop = "myOwnProperty";
+
+ return !dateObj.hasOwnProperty("prop") && dateObj.prop === "myOwnProperty" && data === "myOwnProperty";
+ } finally {
+ delete Date.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js
new file mode 100644
index 000000000..5a61912d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-585",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js",
+
+ description: "ES5 Attributes - Inherited property is enumerable (RegExp instance)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(RegExp.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var regObj = new RegExp();
+ var verifyEnumerable = false;
+ for (var p in regObj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !regObj.hasOwnProperty("prop") && verifyEnumerable;
+ } finally {
+ delete RegExp.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js
new file mode 100644
index 000000000..355b4ac17
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-586",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js",
+
+ description: "ES5 Attributes - Fail to update value of property into of [[Proptotype]] internal property (JSON)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Object.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ JSON.prop = "myOwnProperty";
+
+ return !JSON.hasOwnProperty("prop") && JSON.prop === "data" && data === "data";
+ } finally {
+ delete Object.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js
new file mode 100644
index 000000000..56df4d8ee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-587",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js",
+
+ description: "ES5 Attributes - Inherited property is unenumerable (Math)",
+
+ test: function testcase() {
+ var data = "data";
+ try {
+ Object.defineProperty(Object.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ var verifyEnumerable = false;
+ for (var p in Math) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !Math.hasOwnProperty("prop") && !verifyEnumerable;
+ } finally {
+ delete Object.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js
new file mode 100644
index 000000000..21953bc66
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js
@@ -0,0 +1,76 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-588",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js",
+
+ description: "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ var data1 = 1001;
+ Object.defineProperty(appointment, "startTime", {
+ get: function () {
+ return data1;
+ },
+ enumerable: true,
+ configurable: false
+ });
+ var data2 = "NAME";
+ Object.defineProperty(appointment, "name", {
+ get: function () {
+ return data2;
+ },
+ set: function (value) {
+ data2 = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ var meeting = Object.create(appointment);
+ var data3 = "In-person meeting";
+ Object.defineProperty(meeting, "conferenceCall", {
+ get: function () {
+ return data3;
+ },
+ enumerable: true,
+ configurable: false
+ });
+
+ var teamMeeting = Object.create(meeting);
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty('startTime');
+
+ return hasOwnProperty && teamMeeting.name === "NAME" &&
+ teamMeeting.startTime === 1001 &&
+ teamMeeting.conferenceCall === "In-person meeting";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js
new file mode 100644
index 000000000..2d8817d92
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js
@@ -0,0 +1,86 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-589",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js",
+
+ description: "ES5 Attributes - Success to update value of property into of [[Proptotype]] internal property (Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ var data1 = 1001;
+ Object.defineProperty(appointment, "startTime", {
+ get: function () {
+ return data1;
+ },
+ set: function (value) {
+ data1 = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var data2 = "NAME";
+ Object.defineProperty(appointment, "name", {
+ get: function () {
+ return data2;
+ },
+ set: function (value) {
+ data2 = value;
+ },
+ enumerable: true,
+ configurable: false
+ });
+
+ var meeting = Object.create(appointment);
+ var data3 = "In-person meeting";
+ Object.defineProperty(meeting, "conferenceCall", {
+ get: function () {
+ return data3;
+ },
+ set: function (value) {
+ data3 = value;
+ },
+ enumerable: true,
+ configurable: false
+ });
+
+ var teamMeeting = Object.create(meeting);
+ teamMeeting.name = "Team Meeting";
+ var dateObj = new Date("10/31/2010 08:00");
+ teamMeeting.startTime = dateObj;
+ teamMeeting.conferenceCall = "4255551212";
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty('startTime');
+
+ return hasOwnProperty && teamMeeting.name === "Team Meeting" &&
+ teamMeeting.startTime === dateObj &&
+ teamMeeting.conferenceCall === "4255551212";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js
new file mode 100644
index 000000000..0a1d6c8f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-59",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js",
+
+ description: "Object.defineProperty - 'name' is accessor descriptor and every fields in 'desc' is absent (8.12.9 step 5)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 0;
+ }
+ function setFunc(value) {
+ obj.helpVerifySet = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ Object.defineProperty(obj, "foo", {});
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "helpVerifySet", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js
new file mode 100644
index 000000000..4621be785
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js
@@ -0,0 +1,95 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-590",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js",
+
+ description: "ES5 Attributes - Inherited property is enumerable (Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ var data1 = 1001;
+ Object.defineProperty(appointment, "startTime", {
+ get: function () {
+ return data1;
+ },
+ set: function (value) {
+ data1 = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ var data2 = "NAME";
+ Object.defineProperty(appointment, "name", {
+ get: function () {
+ return data2;
+ },
+ set: function (value) {
+ data2 = value;
+ },
+ enumerable: true,
+ configurable: false
+ });
+
+ var meeting = Object.create(appointment);
+ var data3 = "In-person meeting";
+ Object.defineProperty(meeting, "conferenceCall", {
+ get: function () {
+ return data3;
+ },
+ set: function (value) {
+ data3 = value;
+ },
+ enumerable: true,
+ configurable: false
+ });
+
+ var teamMeeting = Object.create(meeting);
+
+ var verifyTimeProp = false;
+ var verifyNameProp = false;
+ var verifyCallProp = false;
+ for (var p in teamMeeting) {
+ if (p === "startTime") {
+ verifyTimeProp = true;
+ }
+ if (p === "name") {
+ verifyNameProp = true;
+ }
+ if (p === "conferenceCall") {
+ verifyCallProp = true;
+ }
+ }
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty('startTime');
+
+ return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js
new file mode 100644
index 000000000..b2f37d378
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js
@@ -0,0 +1,77 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-591",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js",
+
+ description: "ES5 Attributes - Fail to update value of property of [[Proptotype]] internal property (Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ var data1 = 1001;
+ Object.defineProperty(appointment, "startTime", {
+ get: function () {
+ return data1;
+ },
+ enumerable: false,
+ configurable: false
+ });
+ var data2 = "NAME";
+ Object.defineProperty(appointment, "name", {
+ get: function () {
+ return data2;
+ },
+ enumerable: false,
+ configurable: true
+ });
+
+ var meeting = Object.create(appointment);
+ var data3 = "In-person meeting";
+ Object.defineProperty(meeting, "conferenceCall", {
+ get: function () {
+ return data3;
+ },
+ enumerable: false,
+ configurable: false
+ });
+
+ var teamMeeting = Object.create(meeting);
+ teamMeeting.name = "IE Team Meeting";
+ var dateObj = new Date("10/31/2010 08:00");
+ teamMeeting.startTime = dateObj;
+ teamMeeting.conferenceCall = "4255551212";
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty('startTime');
+
+ return hasOwnProperty && teamMeeting.name === "NAME" &&
+ teamMeeting.startTime === 1001 &&
+ teamMeeting.conferenceCall === "In-person meeting";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js
new file mode 100644
index 000000000..7f341bbc4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js
@@ -0,0 +1,86 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-592",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js",
+
+ description: "ES5 Attributes - Inherited property is non-enumerable (Object.create)",
+
+ test: function testcase() {
+ var appointment = {};
+
+ var data1 = 1001;
+ Object.defineProperty(appointment, "startTime", {
+ get: function () {
+ return data1;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ var data2 = "NAME";
+ Object.defineProperty(appointment, "name", {
+ get: function () {
+ return data2;
+ },
+ enumerable: false,
+ configurable: false
+ });
+
+ var meeting = Object.create(appointment);
+ var data3 = "In-person meeting";
+ Object.defineProperty(meeting, "conferenceCall", {
+ get: function () {
+ return data3;
+ },
+ enumerable: false,
+ configurable: true
+ });
+
+ var teamMeeting = Object.create(meeting);
+
+ var verifyTimeProp = false;
+ var verifyNameProp = false;
+ var verifyCallProp = false;
+ for (var p in teamMeeting) {
+ if (p === "startTime") {
+ verifyTimeProp = true;
+ }
+ if (p === "name") {
+ verifyNameProp = true;
+ }
+ if (p === "conferenceCall") {
+ verifyCallProp = true;
+ }
+ }
+
+ var hasOwnProperty = !teamMeeting.hasOwnProperty("name") &&
+ !teamMeeting.hasOwnProperty("startTime") &&
+ !teamMeeting.hasOwnProperty('startTime');
+
+ return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js
new file mode 100644
index 000000000..b88234941
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-593",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js",
+
+ description: "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ var data = "data";
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+
+ return !obj.hasOwnProperty("prop") && obj.prop === data;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js
new file mode 100644
index 000000000..1b6a62ea6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-594",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js",
+
+ description: "ES5 Attributes - Success to update value of property into of [[Proptotype]] internal property (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ var data = "data";
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+ obj.prop = "overrideData";
+
+ return !obj.hasOwnProperty("prop") && obj.prop === "overrideData";
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js
new file mode 100644
index 000000000..f7f1b14f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-595",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js",
+
+ description: "ES5 Attributes - Inherited property is enumerable (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ var data = "data";
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ set: function (value) {
+ data = value;
+ },
+ enumerable: true,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+
+ var verifyEnumerable = false;
+ for (var p in obj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !obj.hasOwnProperty("prop") && verifyEnumerable;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js
new file mode 100644
index 000000000..f06516583
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-596",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js",
+
+ description: "ES5 Attributes - Fail to update value of property into of [[Proptotype]] internal property (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ var data = "data";
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+ obj.prop = "overrideData";
+
+ return !obj.hasOwnProperty("prop") && obj.prop === "data";
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js
new file mode 100644
index 000000000..de6a1bb21
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-597",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js",
+
+ description: "ES5 Attributes - Inherited property is non-enumerable (Function.prototype.bind)",
+
+ test: function testcase() {
+ var foo = function () { };
+ var data = "data";
+ try {
+ Object.defineProperty(Function.prototype, "prop", {
+ get: function () {
+ return data;
+ },
+ enumerable: false,
+ configurable: true
+ });
+
+ var obj = foo.bind({});
+
+ var verifyEnumerable = false;
+ for (var p in obj) {
+ if (p === "prop") {
+ verifyEnumerable = true;
+ }
+ }
+
+ return !obj.hasOwnProperty("prop") && !verifyEnumerable;
+ } finally {
+ delete Function.prototype.prop;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js
new file mode 100644
index 000000000..087a67982
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-598",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js",
+
+ description: "ES5 Attributes - all attributes in Object.getPrototypeOf are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "getPrototypeOf");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.getPrototypeOf;
+
+ try {
+ Object.getPrototypeOf = "2010";
+
+ var isWritable = (Object.getPrototypeOf === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "getPrototypeOf") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.getPrototypeOf;
+
+ var isConfigurable = !Object.hasOwnProperty("getPrototypeOf");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "getPrototypeOf", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.getPrototypeOf);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js
new file mode 100644
index 000000000..db6589dcc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-599",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js",
+
+ description: "ES5 Attributes - all attributes in Object.getOwnPropertyDescriptor are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyDescriptor");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.getOwnPropertyDescriptor;
+
+ try {
+ Object.getOwnPropertyDescriptor = "2010";
+
+ var isWritable = (Object.getOwnPropertyDescriptor === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "getOwnPropertyDescriptor") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.getOwnPropertyDescriptor;
+
+ var isConfigurable = !Object.hasOwnProperty("getOwnPropertyDescriptor");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "getOwnPropertyDescriptor", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js
new file mode 100644
index 000000000..77810b722
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js
@@ -0,0 +1,72 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. Step 6 of [[DefineOwnProperty]] returns if
+every field of desc also occurs in current and every field in desc has
+the same value as current.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-6",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js",
+
+description: "Object.defineProperty is no-op if current and desc are the same accessor desc",
+
+test: function testcase() {
+ function sameAccessorDescriptorValues(d1, d2) {
+ return (d1.get == d2.get &&
+ d1.enumerable == d2.enumerable &&
+ d1.configurable == d2.configurable);
+ }
+
+ var o = {};
+
+ // create an accessor property with the following attributes:
+ // enumerable: true, configurable: true
+ var desc = {
+ get: function () {},
+ enumerable: true,
+ configurable: true
+ };
+
+ Object.defineProperty(o, "foo", desc);
+
+ // query for, and save, the desc. A subsequent call to defineProperty
+ // with the same desc should not disturb the property definition.
+ var d1 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ // now, redefine the property with the same descriptor
+ // the property defintion should not get disturbed.
+ Object.defineProperty(o, "foo", desc);
+
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+
+ if (sameAccessorDescriptorValues(d1, d2) === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js
new file mode 100644
index 000000000..b1bf41a48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-60",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js",
+
+ description: "Object.defineProperty - type of desc.value is different from type of name.value (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", { value: "abc" });
+ return dataPropertyAttributesAreCorrect(obj, "foo", "abc", true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js
new file mode 100644
index 000000000..ea5bb9a5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-600",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js",
+
+ description: "ES5 Attributes - all attributes in Object.getOwnPropertyNames are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "getOwnPropertyNames");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.getOwnPropertyNames;
+
+ try {
+ Object.getOwnPropertyNames = "2010";
+
+ var isWritable = (Object.getOwnPropertyNames === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "getOwnPropertyNames") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.getOwnPropertyNames;
+
+ var isConfigurable = !Object.hasOwnProperty("getOwnPropertyNames");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "getOwnPropertyNames", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.getOwnPropertyNames);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js
new file mode 100644
index 000000000..b189cc25a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-601",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js",
+
+ description: "ES5 Attributes - all attributes in Object.create are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "create");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.create;
+
+ try {
+ Object.create = "2010";
+
+ var isWritable = (Object.create === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "create") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.create;
+
+ var isConfigurable = !Object.hasOwnProperty("create");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "create", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.create);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js
new file mode 100644
index 000000000..da0e3a3b9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-602",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js",
+
+ description: "ES5 Attributes - all attributes in Object.defineProperty are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "defineProperty");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+ var temp = Object.defineProperty;
+ try {
+ Object.defineProperty = "2010";
+
+ var isWritable = (Object.defineProperty === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "defineProperty") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.defineProperty;
+
+ var isConfigurable = !Object.hasOwnProperty("defineProperty");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty = temp;
+ Object.defineProperty(Object, "defineProperty", {
+ enumerable: false
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js
new file mode 100644
index 000000000..1a22164b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-603",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js",
+
+ description: "ES5 Attributes - all attributes in Object.defineProperties are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "defineProperties");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.defineProperties;
+
+ try {
+ Object.defineProperties = "2010";
+
+ var isWritable = (Object.defineProperties === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "defineProperties") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.defineProperties;
+
+ var isConfigurable = !Object.hasOwnProperty("defineProperties");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "defineProperties", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js
new file mode 100644
index 000000000..443f0641d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-604",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js",
+
+ description: "ES5 Attributes - all attributes in Object.seal are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "seal");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.seal;
+
+ try {
+ Object.seal = "2010";
+
+ var isWritable = (Object.seal === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "seal") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.seal;
+
+ var isConfigurable = !Object.hasOwnProperty("seal");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "seal", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.seal);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js
new file mode 100644
index 000000000..3bf6b8b76
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-605",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js",
+
+ description: "ES5 Attributes - all attributes in Object.freeze are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "freeze");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.freeze;
+
+ try {
+ Object.freeze = "2010";
+
+ var isWritable = (Object.freeze === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "freeze") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.freeze;
+
+ var isConfigurable = !Object.hasOwnProperty("freeze");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "freeze", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.freeze);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js
new file mode 100644
index 000000000..f298abb70
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-606",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js",
+
+ description: "ES5 Attributes - all attributes in Object.preventExtensions are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "preventExtensions");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.preventExtensions;
+
+ try {
+ Object.preventExtensions = "2010";
+
+ var isWritable = (Object.preventExtensions === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "preventExtensions") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.preventExtensions;
+
+ var isConfigurable = !Object.hasOwnProperty("preventExtensions");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "preventExtensions", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.preventExtensions);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js
new file mode 100644
index 000000000..5dfa572b9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-607",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js",
+
+ description: "ES5 Attributes - all attributes in Object.isSealed are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "isSealed");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.isSealed;
+
+ try {
+ Object.isSealed = "2010";
+
+ var isWritable = (Object.isSealed === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "isSealed") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.isSealed;
+
+ var isConfigurable = !Object.hasOwnProperty("isSealed");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "isSealed", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.isSealed);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js
new file mode 100644
index 000000000..b30022368
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-608",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js",
+
+ description: "ES5 Attributes - all attributes in Object.isFrozen are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "isFrozen");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.isFrozen;
+
+ try {
+ Object.isFrozen = "2010";
+
+ var isWritable = (Object.isFrozen === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "isFrozen") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.isFrozen;
+
+ var isConfigurable = !Object.hasOwnProperty("isFrozen");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "isFrozen", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.isFrozen);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js
new file mode 100644
index 000000000..0fb225ec9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-609",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js",
+
+ description: "ES5 Attributes - all attributes in Object.isExtensible are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "isExtensible");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.isExtensible;
+
+ try {
+ Object.isExtensible = "2010";
+
+ var isWritable = (Object.isExtensible === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "isExtensible") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.isExtensible;
+
+ var isConfigurable = !Object.hasOwnProperty("isExtensible");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "isExtensible", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.isExtensible);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js
new file mode 100644
index 000000000..96b781895
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-61",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js",
+
+ description: "Object.defineProperty - both desc.value and name.value are undefined (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { value: undefined });
+
+ Object.defineProperty(obj, "foo", { value: undefined });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js
new file mode 100644
index 000000000..8a5310d2d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-610",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js",
+
+ description: "ES5 Attributes - all attributes in Object.keys are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Object, "keys");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Object.keys;
+
+ try {
+ Object.keys = "2010";
+
+ var isWritable = (Object.keys === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Object) {
+ if (prop === "keys") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Object.keys;
+
+ var isConfigurable = !Object.hasOwnProperty("keys");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Object, "keys", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.keys);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js
new file mode 100644
index 000000000..05455ec6a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-611",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js",
+
+ description: "ES5 Attributes - all attributes in Function.prototype.bind are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Function.prototype, "bind");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Function.prototype.bind;
+
+ try {
+ Function.prototype.bind = "2010";
+
+ var isWritable = (Function.prototype.bind === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Function.prototype) {
+ if (prop === "bind") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Function.prototype.bind;
+
+ var isConfigurable = !Function.prototype.hasOwnProperty("bind");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Function.prototype, "bind", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Function.prototype.bind);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js
new file mode 100644
index 000000000..0ddebe01f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-612",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.indexOf are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "indexOf");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.indexOf;
+
+ try {
+ Array.prototype.indexOf = "2010";
+
+ var isWritable = (Array.prototype.indexOf === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "indexOf") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.indexOf;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("indexOf");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "indexOf", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.indexOf);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js
new file mode 100644
index 000000000..b3678baf4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-613",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js",
+
+ description: "ES5 Attributes - all attributes in Object.lastIndexOf are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "lastIndexOf");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.lastIndexOf;
+
+ try {
+ Array.prototype.lastIndexOf = "2010";
+
+ var isWritable = (Array.prototype.lastIndexOf === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "lastIndexOf") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.lastIndexOf;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("lastIndexOf");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "lastIndexOf", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.lastIndexOf);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js
new file mode 100644
index 000000000..98cc2a9b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-614",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.every are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "every");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.every;
+
+ try {
+ Array.prototype.every = "2010";
+
+ var isWritable = (Array.prototype.every === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "every") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.every;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("every");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "every", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.every);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js
new file mode 100644
index 000000000..767020690
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-615",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.some are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "some");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.some;
+
+ try {
+ Array.prototype.some = "2010";
+
+ var isWritable = (Array.prototype.some === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "some") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.some;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("some");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "some", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.some);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js
new file mode 100644
index 000000000..6705b9827
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-616",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.forEach are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "forEach");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.forEach;
+
+ try {
+ Array.prototype.forEach = "2010";
+
+ var isWritable = (Array.prototype.forEach === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "forEach") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.forEach;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("forEach");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "forEach", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.forEach);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js
new file mode 100644
index 000000000..395e0a602
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-617",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.map are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "map");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.map;
+
+ try {
+ Array.prototype.map = "2010";
+
+ var isWritable = (Array.prototype.map === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "map") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.map;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("map");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "map", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.map);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js
new file mode 100644
index 000000000..9605cb869
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-618",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.filter are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "filter");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.filter;
+
+ try {
+ Array.prototype.filter = "2010";
+
+ var isWritable = (Array.prototype.filter === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "filter") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.filter;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("filter");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "filter", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.filter);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js
new file mode 100644
index 000000000..815fb27fa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-619",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.reduce are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.reduce;
+
+ try {
+ Array.prototype.reduce = "2010";
+
+ var isWritable = (Array.prototype.reduce === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "reduce") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.reduce;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("reduce");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "reduce", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.reduce);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js
new file mode 100644
index 000000000..df4a23bd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-62",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js",
+
+ description: "Object.defineProperty - both desc.value and name.value are null (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { value: null });
+
+ Object.defineProperty(obj, "foo", { value: null });
+ return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js
new file mode 100644
index 000000000..f9d3e3c05
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-620",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js",
+
+ description: "ES5 Attributes - all attributes in Array.prototype.reduceRight are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Array.prototype, "reduceRight");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Array.prototype.reduceRight;
+
+ try {
+ Array.prototype.reduceRight = "2010";
+
+ var isWritable = (Array.prototype.reduceRight === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Array.prototype) {
+ if (prop === "reduceRight") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Array.prototype.reduceRight;
+
+ var isConfigurable = !Array.prototype.hasOwnProperty("reduceRight");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Array.prototype, "reduceRight", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.reduceRight);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js
new file mode 100644
index 000000000..0cc30284b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-621",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js",
+
+ description: "ES5 Attributes - all attributes in String.prototype.trim are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "trim");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = String.prototype.trim;
+
+ try {
+ String.prototype.trim = "2010";
+
+ var isWritable = (String.prototype.trim === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in String.prototype) {
+ if (prop === "trim") {
+ isEnumerable = true;
+ }
+ }
+
+ delete String.prototype.trim;
+
+ var isConfigurable = !String.prototype.hasOwnProperty("trim");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(String.prototype, "trim", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(String.prototype.trim);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js
new file mode 100644
index 000000000..5fa270c90
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-622",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js",
+
+ description: "ES5 Attributes - all attributes in Date.now are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date, "now");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Date.now;
+
+ try {
+ Date.now = "2010";
+
+ var isWritable = (Date.now === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Date) {
+ if (prop === "now") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Date.now;
+
+ var isConfigurable = !Date.hasOwnProperty("now");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Date, "now", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Date.now);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js
new file mode 100644
index 000000000..c0e093b4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-623",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js",
+
+ description: "ES5 Attributes - all attributes in Date.prototype.toISOString are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toISOString");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Date.prototype.toISOString;
+
+ try {
+ Date.prototype.toISOString = "2010";
+
+ var isWritable = (Date.prototype.toISOString === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Date.prototype) {
+ if (prop === "toISOString") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Date.prototype.toISOString;
+
+ var isConfigurable = !Date.prototype.hasOwnProperty("toISOString");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Date.prototype, "toISOString", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Date.prototype.toISOString);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js
new file mode 100644
index 000000000..d82b77f49
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-624",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js",
+
+ description: "ES5 Attributes - all attributes in Date.prototype.toJSON are correct",
+
+ test: function testcase() {
+ var desc = Object.getOwnPropertyDescriptor(Date.prototype, "toJSON");
+
+ var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);
+
+ var temp = Date.prototype.toJSON;
+
+ try {
+ Date.prototype.toJSON = "2010";
+
+ var isWritable = (Date.prototype.toJSON === "2010");
+
+ var isEnumerable = false;
+
+ for (var prop in Date.prototype) {
+ if (prop === "toJSON") {
+ isEnumerable = true;
+ }
+ }
+
+ delete Date.prototype.toJSON;
+
+ var isConfigurable = !Date.prototype.hasOwnProperty("toJSON");
+
+ return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;
+ } finally {
+ Object.defineProperty(Date.prototype, "toJSON", {
+ value: temp,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Date.prototype.toJSON);
+ }
+});
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js
new file mode 100644
index 000000000..2d9172ceb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-63",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js",
+
+ description: "Object.defineProperty - both desc.value and name.value are NaN (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { value: NaN });
+
+ Object.defineProperty(obj, "foo", { value: NaN });
+
+ if (!isNaN(obj.foo)) {
+ return false;
+ }
+
+ obj.foo = "verifyValue";
+ if (obj.foo === "verifyValue") {
+ return false;
+ }
+
+ for (var prop in obj) {
+ if (obj.hasOwnProperty(prop) && prop === "foo") {
+ return false;
+ }
+ }
+
+ delete obj.foo;
+ if (!obj.hasOwnProperty("foo")) {
+ return false;
+ }
+
+ return true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js
new file mode 100644
index 000000000..93a7ccc93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-64",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js",
+
+ description: "Object.defineProperty - desc.value = +0 and name.value = -0 (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { value: -0 });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: +0 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js
new file mode 100644
index 000000000..9ff8d0f9b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-65",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js",
+
+ description: "Object.defineProperty - desc.value = -0 and name.value = +0 (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { value: +0 });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: -0 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js
new file mode 100644
index 000000000..b72f35cc6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-66",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js",
+
+ description: "Object.defineProperty - desc.value and name.value are two numbers with different values (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", { value: 102 });
+ return dataPropertyAttributesAreCorrect(obj, "foo", 102, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js
new file mode 100644
index 000000000..4204e5a4a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-67",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js",
+
+ description: "Object.defineProperty - both desc.value and name.value are two strings which have same length and same characters in corresponding positions (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { value: "abcd" });
+
+ Object.defineProperty(obj, "foo", { value: "abcd" });
+ return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js
new file mode 100644
index 000000000..5f038bfe3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-68",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js",
+
+ description: "Object.defineProperty - desc.value and name.value are two strings with different values (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = "abcd"; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", { value: "fghj" });
+ return dataPropertyAttributesAreCorrect(obj, "foo", "fghj", true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js
new file mode 100644
index 000000000..d78e27a24
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-69",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js",
+
+ description: "Object.defineProperty - both desc.value and name.value are boolean values with the same value (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { value: true });
+
+ Object.defineProperty(obj, "foo", { value: true });
+ return dataPropertyAttributesAreCorrect(obj, "foo", true, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js
new file mode 100644
index 000000000..ee25d1913
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. Step 7a of [[DefineOwnProperty]] rejects if
+current.[[Configurable]] is false and desc.[[Configurable]] is true.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-7",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js",
+
+description: "Object.defineProperty throws TypeError when changing [[Configurable]] from false to true",
+
+test: function testcase() {
+ var o = {};
+
+ // create a data valued property; all other attributes default to false.
+ var d1 = { value: 101, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ var desc = { value: 101, configurable: true };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.value === 101 &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js
new file mode 100644
index 000000000..9aa75a2c7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-70",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js",
+
+ description: "Object.defineProperty - desc.value and name.value are two boolean values with different values (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ obj.foo = true; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ Object.defineProperty(obj, "foo", { value: false });
+ return dataPropertyAttributesAreCorrect(obj, "foo", false, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js
new file mode 100644
index 000000000..f6228b482
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-71",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js",
+
+ description: "Object.defineProperty - both desc.value and name.value are Ojbects which refer to the same Object (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var obj1 = { length: 10 };
+
+ Object.defineProperty(obj, "foo", { value: obj1 });
+
+ Object.defineProperty(obj, "foo", { value: obj1 });
+ return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js
new file mode 100644
index 000000000..22e993ad1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-72",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js",
+
+ description: "Object.defineProperty - desc.value and name.value are two Ojbects which refer to the different objects (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var obj1 = { length: 10 };
+ obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true
+
+ var obj2 = { length: 20 };
+
+ Object.defineProperty(obj, "foo", { value: obj2 });
+ return dataPropertyAttributesAreCorrect(obj, "foo", obj2, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js
new file mode 100644
index 000000000..68efdfb36
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-73",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js",
+
+ description: "Object.defineProperty - both desc.writable and name.writable are boolean values with the same value (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { writable: false});
+
+ Object.defineProperty(obj, "foo", { writable: false });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js
new file mode 100644
index 000000000..a17147e5c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-74",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js",
+
+ description: "Object.defineProperty - desc.writable and name.writable are two boolean values with different values (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { writable: false, configurable: true });
+
+ Object.defineProperty(obj, "foo", { writable: true });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js
new file mode 100644
index 000000000..5bb3132f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-75",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js",
+
+ description: "Object.defineProperty - both desc.[[Get]] and name.[[Get]] are two objects which refer to the same object (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 10;
+ }
+ function setFunc(value) {
+ obj.helpVerifySet = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc
+ });
+
+ Object.defineProperty(obj, "foo", { get: getFunc });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "helpVerifySet", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js
new file mode 100644
index 000000000..1739a3a5b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-76",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js",
+
+ description: "Object.defineProperty - desc.[[Get]] and name.[[Get]] are two objects which refer to the different objects (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc1() {
+ return 10;
+ }
+ function setFunc1(value) {
+ obj.helpVerifySet = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc1,
+ set: setFunc1,
+ configurable: true
+ });
+
+ function getFunc2() {
+ return 20;
+ }
+
+ Object.defineProperty(obj, "foo", { get: getFunc2 });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc2, setFunc1, "helpVerifySet", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js
new file mode 100644
index 000000000..e141f8e7b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-77",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js",
+
+ description: "Object.defineProperty - both desc.[[Set]] and name.[[Set]] are two objects which refer to the same object (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", { set: setFunc });
+
+ Object.defineProperty(obj, "foo", { set: setFunc });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js
new file mode 100644
index 000000000..ed38f09e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-78",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js",
+
+ description: "Object.defineProperty - desc.[[Set]] and name.[[Set]] are two objects which refer to the different objects (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function setFunc1() { }
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc1,
+ configurable: true
+ });
+
+ function setFunc2(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", { set: setFunc2 });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc2, "setVerifyHelpProp", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js
new file mode 100644
index 000000000..f5e2d4ded
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-79",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js",
+
+ description: "Object.defineProperty - both desc.enumerable and name.enumerable are boolean values with the same value (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { enumerable: false });
+
+ Object.defineProperty(obj, "foo", { enumerable: false });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js
new file mode 100644
index 000000000..f9ce4a8da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if
+current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations
+of each other.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-8",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js",
+
+description: "Object.defineProperty throws TypeError when changing [[Enumerable]] from false to true on non-configurable data properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create a data valued property; all other attributes default to false.
+ var d1 = { value: 101, enumerable: false, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, setting enumerable to true should fail, since [[Configurable]]
+ // on the original property will be false.
+ var desc = { value: 101, enumerable: true };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.value === 101 &&
+ d2.enumerable === false &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js
new file mode 100644
index 000000000..d5013116d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-80",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js",
+
+ description: "Object.defineProperty - desc.enumerable and name.enumerable are boolean negation of each other (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { enumerable: false, configurable: true });
+
+ Object.defineProperty(obj, "foo", { enumerable: true });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js
new file mode 100644
index 000000000..11350e8bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-81",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js",
+
+ description: "Object.defineProperty - both desc.configurable and name.configurable are booleans with the same value (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { configurable: false });
+
+ Object.defineProperty(obj, "foo", { configurable: false });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js
new file mode 100644
index 000000000..a98c88bd5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as false, 'name' property is a data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js
new file mode 100644
index 000000000..2b008d146
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-10",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute is false, 'name' property is an accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "foo", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: true,
+ configurable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js
new file mode 100644
index 000000000..8345f7260
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-11",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "foo", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: false,
+ configurable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js
new file mode 100644
index 000000000..96ea00a03
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-12",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attributes of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "foo", {
+ get: get_func,
+ set: set_func,
+ enumerable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: true
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js
new file mode 100644
index 000000000..8fa28cd5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-13",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as false, 'name' property is an index data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js
new file mode 100644
index 000000000..666c67fb0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-14",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as false and [[Configurable]] attribute as true, 'name' property is an index data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: false,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js
new file mode 100644
index 000000000..737db1331
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-15",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Configurable]] attribute of 'name' property is true, the 'desc' is a generic descriptor which contains [[Configurable]] attribute as false, 'name' property is an index data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js
new file mode 100644
index 000000000..43596dbfd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-16",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute as false, 'name' property is an index data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: true,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js
new file mode 100644
index 000000000..1787b81b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-17",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an index data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: false,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js
new file mode 100644
index 000000000..fee4a0319
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-18",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an index data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "0", {
+ value: 1001,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "0", 1001, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js
new file mode 100644
index 000000000..efac7a788
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-19",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [Enumerable]] attribute as false and 'name' property is an index accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js
new file mode 100644
index 000000000..aa5010cb6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-2",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as false and [[Configurable]] attribute as true, 'name' property is a data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: false,
+ configurable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js
new file mode 100644
index 000000000..9661d8a23
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-20",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [Enumerable]] attribute as false and [[Configurable]] property is true, 'name' property is an index accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: false,
+ configurable: true
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js
new file mode 100644
index 000000000..56a606410
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-21",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Configurable]] attribute as false, 'name' property is an index accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ configurable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js
new file mode 100644
index 000000000..4dc9c03e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-22",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute is false, 'name' property is an index accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: true,
+ configurable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js
new file mode 100644
index 000000000..69b6d77f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-23",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an index accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: false,
+ configurable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js
new file mode 100644
index 000000000..b98488d9a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-24",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attributes of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an index accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "0", {
+ get: get_func,
+ set: set_func,
+ enumerable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "0", {
+ enumerable: true
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "0", get_func, set_func, "verifySetFunction", true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js
new file mode 100644
index 000000000..c1a16b20c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-3",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Configurable]] attribute of 'name' property is true, the 'desc' is a generic descriptor which contains [[Configurable]] attribute as false, 'name' property is a data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js
new file mode 100644
index 000000000..1bb63ab2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-4",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute as false, 'name' property is a data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: true,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js
new file mode 100644
index 000000000..6d47c0f17
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-5",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is a data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 1001,
+ writable: true,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: false,
+ configurable: false
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js
new file mode 100644
index 000000000..40c056b5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-6",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is a data property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 1001,
+ writable: true,
+ enumerable: false,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: true
+ });
+
+ return dataPropertyAttributesAreCorrect(obj, "foo", 1001, true, true, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js
new file mode 100644
index 000000000..a020918e0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-7",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [Enumerable]] attribute as false and 'name' property is an accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "foo", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js
new file mode 100644
index 000000000..4301ed221
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-8",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js",
+
+ description: "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [Enumerable]] attribute as false and [[Configurable]] property is true, 'name' property is an accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "foo", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ enumerable: false,
+ configurable: true
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", false, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js
new file mode 100644
index 000000000..d4e529339
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82-9",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js",
+
+ description: "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Configurable]] attribute as false, 'name' property is an accessor property (8.12.9 step 8)",
+
+ test: function testcase() {
+
+ var obj = {};
+ obj.verifySetFunction = "data";
+ var get_func = function () {
+ return obj.verifySetFunction;
+ };
+ var set_func = function (value) {
+ obj.verifySetFunction = value;
+ };
+ Object.defineProperty(obj, "foo", {
+ get: get_func,
+ set: set_func,
+ enumerable: true,
+ configurable: true
+ });
+
+ Object.defineProperty(obj, "foo", {
+ configurable: false
+ });
+
+ return accessorPropertyAttributesAreCorrect(obj, "foo", get_func, set_func, "verifySetFunction", true, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js
new file mode 100644
index 000000000..a0deceb85
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-82",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js",
+
+ description: "Object.defineProperty - desc.configurable and name.configurable are boolean negation of each other (8.12.9 step 6)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", { configurable: true });
+
+ Object.defineProperty(obj, "foo", { configurable: false });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js
new file mode 100644
index 000000000..3107869af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-83",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js",
+
+ description: "Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = undefined and desc.value = undefined (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: undefined,
+ writable: false,
+ configurable: false
+ });
+
+ Object.defineProperty(obj, "foo", {
+ value: undefined,
+ writable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js
new file mode 100644
index 000000000..48a234e9d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-84",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js",
+
+ description: "Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = null and desc.value = null (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: null,
+ writable: false,
+ configurable: false
+ });
+
+ Object.defineProperty(obj, "foo", {
+ value: null,
+ writable: false,
+ configurable: false
+ });
+ return dataPropertyAttributesAreCorrect(obj, "foo", null, false, false, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js
new file mode 100644
index 000000000..8d424bff7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-85",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js",
+
+ description: "Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = NaN and desc.value = NaN (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: NaN,
+ writable: false,
+ configurable: false
+ });
+
+ Object.defineProperty(obj, "foo", {
+ value: NaN,
+ writable: false,
+ configurable: false
+ });
+
+ if (!isNaN(obj.foo)) {
+ return false;
+ }
+
+ obj.foo = "verifyValue";
+ if (obj.foo === "verifyValue") {
+ return false;
+ }
+
+ for (var prop in obj) {
+ if (obj.hasOwnProperty(prop) && prop === "foo") {
+ return false;
+ }
+ }
+
+ delete obj.foo;
+ if (!obj.hasOwnProperty("foo")) {
+ return false;
+ }
+
+ return true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js
new file mode 100644
index 000000000..6fd56e860
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-86",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value = +0 and name.value = -0 (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: -0,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: +0 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", -0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
+
+
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js
new file mode 100644
index 000000000..73edcebb7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-87",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value = -0 and name.value = +0 (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: +0,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: -0 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", +0, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js
new file mode 100644
index 000000000..935adf7e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-88",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js",
+
+ description: "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two numbers with the same value (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 100,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: 100 });
+ return dataPropertyAttributesAreCorrect(obj, "foo", 100, false, false, false);
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js
new file mode 100644
index 000000000..c647f8073
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-89",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two numbers with different values (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: 10,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: 20 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", 10, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js
new file mode 100644
index 000000000..65e14f94b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Step 4 of defineProperty calls the [[DefineOwnProperty]] internal method
+of O to define the property. Step 7b of [[DefineOwnProperty]] rejects if
+current.[[Enumerable]] and desc.[[Enumerable]] are the boolean negations
+of each other.
+*/
+
+ES5Harness.registerTest( {
+id: "15.2.3.6-4-9",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js",
+
+description: "Object.defineProperty throws TypeError when changing [[Enumerable]] from true to false on non-configurable data properties",
+
+test: function testcase() {
+ var o = {};
+
+ // create a data valued property with [[Enumerable]] explicitly set to true;
+ // all other attributes default to false.
+ var d1 = { value: 101, enumerable: true, configurable: false };
+ Object.defineProperty(o, "foo", d1);
+
+ // now, setting enumerable to false should fail, since [[Configurable]]
+ // on the original property will be false.
+ var desc = { value: 101, enumerable: false };
+
+ try {
+ Object.defineProperty(o, "foo", desc);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ // the property should remain unchanged.
+ var d2 = Object.getOwnPropertyDescriptor(o, "foo");
+ if (d2.value === 101 &&
+ d2.enumerable === true &&
+ d2.configurable === false) {
+ return true;
+ }
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js
new file mode 100644
index 000000000..311562f80
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-90",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js",
+
+ description: "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two strings with the same value (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: "abcd",
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: "abcd" });
+ return dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false);
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js
new file mode 100644
index 000000000..fb8f6e887
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-91",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two strings with different values (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: "abcd",
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: "fghj" });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", "abcd", false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js
new file mode 100644
index 000000000..ccb28d9e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-92",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js",
+
+ description: "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two booleans with the same value (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: false,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: false });
+ return dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false);
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js
new file mode 100644
index 000000000..56550641a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-93",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two booleans with different values (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "foo", {
+ value: false,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: true });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", false, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js
new file mode 100644
index 000000000..ff898e534
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-94",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js",
+
+ description: "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two Objects refer to the same object (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var obj1 = { length: 10 };
+
+ Object.defineProperty(obj, "foo", {
+ value: obj1,
+ writable: false,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { value: obj1 });
+ return dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false);
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js
new file mode 100644
index 000000000..44cdd21b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-95",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two objects which refer to the different objects (8.12.9 step 10.a.ii.1)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var obj1 = { length: 10 };
+
+ Object.defineProperty(obj, "foo", {
+ value: obj1,
+ writable: false,
+ configurable: false
+ });
+
+ var obj2 = { length: 20 };
+
+ try {
+ Object.defineProperty(obj, "foo", { value: obj2 });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, "foo", obj1, false, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js
new file mode 100644
index 000000000..2cae83154
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-96",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js",
+
+ description: "Object.defineProperty will not throw TypeError when name.configurable = false, both desc.[[Set]] and name.[[Set]] are two objects which refer to the same object (8.12.9 step 11.a.i)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { set: setFunc });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false);
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js
new file mode 100644
index 000000000..1dc4500fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-97",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.[[Set]] is undefined, desc.[[Set]] refers to an object (8.12.9 step 11.a.i)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return "property";
+ }
+
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "property", {
+ get: getFunc,
+ set: function () { },
+ configurable: false
+ });
+
+ return false;
+ } catch (e) {
+ return e instanceof TypeError &&
+ accessorPropertyAttributesAreCorrect(obj, "property", getFunc, undefined, undefined, false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js
new file mode 100644
index 000000000..203ae8c49
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-98",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js",
+
+ description: "Object.defineProperty will not throw TypeError when name.configurable = false, both desc.[[Get]] and name.[[Get]] are two objects which refer to the same object (8.12.9 step 11.a.ii)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function getFunc() {
+ return 10;
+ }
+ function setFunc(value) {
+ obj.verifyGetHelpMethod = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc,
+ configurable: false
+ });
+
+ try {
+ Object.defineProperty(obj, "foo", { get: getFunc });
+ return accessorPropertyAttributesAreCorrect(obj, "foo", getFunc, setFunc, "verifyGetHelpMethod", false, false);
+ } catch (e) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js
new file mode 100644
index 000000000..fd1d73e51
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ES5Harness.registerTest({
+ id: "15.2.3.6-4-99",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js",
+
+ description: "Object.defineProperty will throw TypeError when name.configurable = false, name.[[Get]] is undefined, desc.[[Get]] refers to an objcet (8.12.9 step 11.a.ii)",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function setFunc(value) {
+ obj.setVerifyHelpProp = value;
+ }
+
+ Object.defineProperty(obj, "foo", {
+ set: setFunc,
+ configurable: false
+ });
+
+ function getFunc() {
+ return 10;
+ }
+
+ try {
+ Object.defineProperty(obj, "foo", {
+ get: getFunc,
+ set: setFunc
+ });
+ return false;
+ } catch (e) {
+ return e instanceof TypeError && accessorPropertyAttributesAreCorrect(obj, "foo", undefined, setFunc, "setVerifyHelpProp", false, false);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.defineProperty);
+ }
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js
new file mode 100644
index 000000000..81d5cbcc7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.7-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js",
+
+description: "Object.defineProperties must exist as a function",
+
+test: function testcase() {
+ var f = Object.defineProperties;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js
new file mode 100644
index 000000000..6eef5f0de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.7-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js",
+
+description: "Object.defineProperties must exist as a function taking 2 parameters",
+
+test: function testcase() {
+ if (Object.defineProperties.length === 2) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperties);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js
new file mode 100644
index 000000000..6edf69eaf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.7-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js",
+
+description: "Object.defineProperties throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.defineProperties(0, {});
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.defineProperties);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js
new file mode 100644
index 000000000..98fbedeb8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.8-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js",
+
+description: "Object.seal must exist as a function",
+
+test: function testcase() {
+ var f = Object.seal;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js
new file mode 100644
index 000000000..b9b90d29b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.8-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js",
+
+description: "Object.seal must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.seal.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.seal);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js
new file mode 100644
index 000000000..2a29ee680
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.8-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js",
+
+description: "Object.seal throws TypeError if type of first param is not Object",
+
+test: function testcase() {
+ try {
+ Object.seal(0);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.seal);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js
new file mode 100644
index 000000000..97d2e0070
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.9-0-1",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js",
+
+description: "Object.freeze must exist as a function",
+
+test: function testcase() {
+ var f = Object.freeze;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js
new file mode 100644
index 000000000..c8ee168f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.2.3.9-0-2",
+
+path: "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js",
+
+description: "Object.freeze must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Object.freeze.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.freeze);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js
new file mode 100644
index 000000000..358121316
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.2.3.9-1",
+
+ path: "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js",
+
+ description: "Object.freeze throws TypeError if type of first param is not Object",
+
+ test: function testcase() {
+ try {
+ Object.freeze(0);
+ return false;
+ } catch (e) {
+ return e instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Object.freeze);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js
new file mode 100644
index 000000000..5ea6464ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.2.1-11-1",
+
+path: "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js",
+
+description: "Duplicate separate parameter name in Function constructor allowed if body not strict",
+
+test: function testcase()
+{
+ Function('a','a','return;');
+ return true;
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js b/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js
new file mode 100644
index 000000000..25cc5f6df
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js
@@ -0,0 +1,33 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.2.1-11-3",
+
+path: "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js",
+
+description: "Function constructor may have a formal parameter named 'eval' if body is not strict mode",
+
+test: function testcase() {
+ Function('eval', 'return;');
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js b/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js
new file mode 100644
index 000000000..37296f419
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.2.1-11-5",
+
+path: "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js",
+
+description: "Duplicate combined parameter name in Function constructor allowed if body is not strict",
+
+test: function testcase()
+{
+ Function('a,a','return;');
+ return true;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js
new file mode 100644
index 000000000..98d45995f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.3.2-1",
+
+path: "TestCases/chapter15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js",
+
+description: "Function.length - data property with value 1",
+
+test: function testcase() {
+
+ var desc = Object.getOwnPropertyDescriptor(Function,"length");
+ if(desc.value === 1 &&
+ desc.writable === false &&
+ desc.enumerable === false &&
+ desc.configurable === false)
+ return true;
+
+ },
+
+precondition: function () {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js
new file mode 100644
index 000000000..192fd499f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-0-1",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js",
+
+description: "Function.prototype.bind must exist as a function",
+
+test: function testcase() {
+ var f = Function.prototype.bind;
+
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js
new file mode 100644
index 000000000..834b9cb08
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-0-2",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js",
+
+description: "Function.prototype.bind must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Function.prototype.bind.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js
new file mode 100644
index 000000000..43bcd3432
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-13.b-1",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js",
+
+description: "Function.prototype.bind, bound fn has a 'length' own property",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ if (bf.hasOwnProperty('length')) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js
new file mode 100644
index 000000000..24cac3133
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-13.b-2",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js",
+
+description: "Function.prototype.bind, 'length' set to remaining number of expected args",
+
+test: function testcase() {
+ function foo(x, y) { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ if (bf.length === 2) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js
new file mode 100644
index 000000000..4a36dca37
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-13.b-3",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js",
+
+description: "Function.prototype.bind, 'length' set to remaining number of expected args (all args prefilled)",
+
+test: function testcase() {
+ function foo(x, y) { }
+ var o = {};
+
+ var bf = foo.bind(o, 42, 101);
+ if (bf.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js
new file mode 100644
index 000000000..816abf5fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-13.b-4",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js",
+
+description: "Function.prototype.bind, 'length' set to remaining number of expected args (target takes 0 args)",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ if (bf.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js
new file mode 100644
index 000000000..bf2ada7a8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-13.b-5",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js",
+
+description: "Function.prototype.bind, 'length' set to remaining number of expected args (target provided extra args)",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o, 42);
+ if (bf.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js
new file mode 100644
index 000000000..93243c44d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-15-1",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js",
+
+description: "Function.prototype.bind, 'length' is a data valued own property",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ var desc = Object.getOwnPropertyDescriptor(bf, 'length');
+ if (desc.hasOwnProperty('value') === true &&
+ desc.hasOwnProperty('get') === false &&
+ desc.hasOwnProperty('set') === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js
new file mode 100644
index 000000000..bea5e9445
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-15-2",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js",
+
+description: "Function.prototype.bind, 'length' is a data valued own property with default attributes (false)",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ var desc = Object.getOwnPropertyDescriptor(bf, 'length');
+ if (desc.value === 0 &&
+ desc.enumerable === false &&
+ desc.writable === false &&
+ desc.configurable == false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js
new file mode 100644
index 000000000..439ff83d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-16-1",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js",
+
+description: "Function.prototype.bind, [[Extensible]] of the bound fn is true",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ var ex = Object.isExtensible(bf);
+ if (ex === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind) && fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js
new file mode 100644
index 000000000..53233fd7a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-1",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js",
+
+description: "Function.prototype.bind throws TypeError if the Target is not callable (but an instance of Function)",
+
+test: function testcase() {
+ foo.prototype = Function.prototype;
+ // dummy function
+ function foo() {}
+ var f = new foo();
+
+ try {
+ f.bind();
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js
new file mode 100644
index 000000000..987d566ad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-2",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js",
+
+description: "Function.prototype.bind throws TypeError if the Target is not callable (bind attached to object)",
+
+test: function testcase() {
+ // dummy function
+ function foo() {}
+ var f = new foo();
+ f.bind = Function.prototype.bind;
+
+ try {
+ f.bind();
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js
new file mode 100644
index 000000000..6f924d7b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-3",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js",
+
+description: "Function.prototype.bind allows Target to be a constructor (Number)",
+
+test: function testcase() {
+ var bnc = Number.bind(null);
+ var n = bnc(42);
+ if (n === 42) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js
new file mode 100644
index 000000000..813c7fdd1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-4",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js",
+
+description: "Function.prototype.bind allows Target to be a constructor (String)",
+
+test: function testcase() {
+ var bsc = String.bind(null);
+ var s = bsc("hello world");
+ if (s === "hello world") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js
new file mode 100644
index 000000000..467766721
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-5",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js",
+
+description: "Function.prototype.bind allows Target to be a constructor (Boolean)",
+
+test: function testcase() {
+ var bbc = Boolean.bind(null);
+ var b = bbc(true);
+ if (b === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js
new file mode 100644
index 000000000..097dc860d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-6",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js",
+
+description: "Function.prototype.bind allows Target to be a constructor (Object)",
+
+test: function testcase() {
+ var boc = Object.bind(null);
+ var o = boc(42);
+ if (o == 42) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js
new file mode 100644
index 000000000..fbb108e5d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-7",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js",
+
+description: "Function.prototype.bind throws TypeError if the Target is not callable (JSON)",
+
+test: function testcase() {
+ try {
+ JSON.bind();
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js
new file mode 100644
index 000000000..b1294ee3d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.3.4.5 step 2 specifies that a TypeError must be thrown if the Target is not callable.
+*/
+
+ES5Harness.registerTest({
+ id: "15.3.4.5-2-8",
+
+ path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js",
+
+ description: "Function.prototype.bind allows Target to be a constructor (Array)",
+
+ test: function testcase() {
+ var bac = Array.bind(null);
+ var a = bac(42);
+ a.prop = "verifyPropertyExist";
+ a[41] = 41;
+
+ return a.prop === "verifyPropertyExist" && a[41] === 41 && a.length === 42;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js
new file mode 100644
index 000000000..4ac76eac1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-2-9",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js",
+
+description: "Function.prototype.bind allows Target to be a constructor (Date)",
+
+test: function testcase() {
+ var bdc = Date.bind(null);
+ var s = bdc(0, 0, 0);
+ if (typeof(s) === 'string') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js
new file mode 100644
index 000000000..5593e8b19
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-8-1",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js",
+
+description: "Function.prototype.bind, type of bound function must be 'function'",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ if (typeof(bf) === 'function') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js
new file mode 100644
index 000000000..805530450
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-8-2",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js",
+
+description: "Function.prototype.bind, [[Class]] of bound function must be 'Function'",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ var s = Object.prototype.toString.call(bf);
+ if (s === '[object Function]') {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js
new file mode 100644
index 000000000..62daec118
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-9-1",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js",
+
+description: "Function.prototype.bind, [[Prototype]] is Function.prototype",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ if (Function.prototype.isPrototypeOf(bf)) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js
new file mode 100644
index 000000000..5e85d51bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.3.4.5-9-2",
+
+path: "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js",
+
+description: "Function.prototype.bind, [[Prototype]] is Function.prototype (using getPrototypeOf)",
+
+test: function testcase() {
+ function foo() { }
+ var o = {};
+
+ var bf = foo.bind(o);
+ if (Object.getPrototypeOf(bf) === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Function.prototype.bind) && fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js
new file mode 100644
index 000000000..dd8b9e0c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.3.2-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js",
+
+description: "Array.isArray must exist as a function",
+
+test: function testcase() {
+ var f = Array.isArray;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js
new file mode 100644
index 000000000..0e631e9b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.3.2-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js",
+
+description: "Array.isArray must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Array.isArray.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js
new file mode 100644
index 000000000..33e4bee71
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.3.2-0-3",
+
+path: "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js",
+
+description: "Array.isArray return true if its argument is an Array",
+
+test: function testcase() {
+ var a = [];
+ var b = Array.isArray(a);
+ if (b === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js
new file mode 100644
index 000000000..24c94c2f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.3.2-0-4",
+
+path: "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js",
+
+description: "Array.isArray return false if its argument is not an Array",
+
+test: function testcase() {
+ var b_num = Array.isArray(42);
+ var b_undef = Array.isArray(undefined);
+ var b_bool = Array.isArray(true);
+ var b_str = Array.isArray("abc");
+ var b_obj = Array.isArray({});
+ var b_null = Array.isArray(null);
+
+ if (b_num === false &&
+ b_undef === false &&
+ b_bool === false &&
+ b_str === false &&
+ b_obj === false &&
+ b_null === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js
new file mode 100644
index 000000000..e08228e50
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.3.2-0-5",
+
+path: "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js",
+
+description: "Array.isArray return true if its argument is an Array (Array.prototype)",
+
+test: function testcase() {
+ var b = Array.isArray(Array.prototype);
+ if (b === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js
new file mode 100644
index 000000000..7024e4b28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.3.2-0-6",
+
+path: "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js",
+
+description: "Array.isArray return true if its argument is an Array (new Array())",
+
+test: function testcase() {
+ var a = new Array(10);
+ var b = Array.isArray(a);
+ if (b === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js
new file mode 100644
index 000000000..d191a1041
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.3.2-0-7",
+
+path: "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js",
+
+description: "Array.isArray returns false if its argument is not an Array",
+
+test: function testcase() {
+ var o = new Object();
+ o[12] = 13;
+ var b = Array.isArray(o);
+ if (b === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js
new file mode 100644
index 000000000..bd352a84e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js",
+
+description: "Array.prototype.indexOf must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.indexOf;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js
new file mode 100644
index 000000000..078e3afeb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js",
+
+description: "Array.prototype.indexOf has a length property whose value is 1.",
+
+test: function testcase() {
+ if (Array.prototype.indexOf.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js
new file mode 100644
index 000000000..853567a60
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-1-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js",
+
+description: "Array.prototype.indexOf applied to undefined throws a TypeError",
+
+test: function testcase() {
+ try {Array.prototype.indexOf.call(undefined)}
+ catch (e) {
+ if (e instanceof TypeError) return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js
new file mode 100644
index 000000000..d413cdafe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js",
+
+ description: "Array.prototype.indexOf applied to the Math object",
+
+ test: function testcase() {
+ try {
+ Math[1] = true;
+ Math.length = 2;
+ return Array.prototype.indexOf.call(Math, true) === 1;
+ } finally {
+ delete Math[1];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js
new file mode 100644
index 000000000..ece0b52d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js",
+
+ description: "Array.prototype.indexOf applied to Date object",
+
+ test: function testcase() {
+
+ var obj = new Date();
+ obj.length = 2;
+ obj[1] = true;
+
+ return Array.prototype.indexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js
new file mode 100644
index 000000000..38a3cc6bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js",
+
+ description: "Array.prototype.indexOf applied to RegExp object",
+
+ test: function testcase() {
+
+ var obj = new RegExp();
+ obj.length = 2;
+ obj[1] = true;
+
+ return Array.prototype.indexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js
new file mode 100644
index 000000000..89ebe910c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js",
+
+ description: "Array.prototype.indexOf applied to the JSON object",
+
+ test: function testcase() {
+ var targetObj = {};
+ try {
+ JSON[3] = targetObj;
+ JSON.length = 5;
+ return Array.prototype.indexOf.call(JSON, targetObj) === 3;
+ } finally {
+ delete JSON[3];
+ delete JSON.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js
new file mode 100644
index 000000000..809854710
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js",
+
+ description: "Array.prototype.indexOf applied to Error object",
+
+ test: function testcase() {
+
+ var obj = new SyntaxError();
+ obj[1] = true;
+ obj.length = 2;
+
+ return Array.prototype.indexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js
new file mode 100644
index 000000000..9abace63e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js",
+
+ description: "Array.prototype.indexOf applied to Arguments object",
+
+ test: function testcase() {
+
+ function fun() {
+ return arguments;
+ }
+ var obj = fun(1, true, 3);
+
+ return Array.prototype.indexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-16.js
new file mode 100644
index 000000000..79ab0e763
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-16.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-1-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-16.js",
+
+ description: "Array.prototype.indexOf applied to the document host object",
+
+ test: function testcase() {
+ try {
+ var oldLen = document.length;
+ document[1] = true;
+ document.length = 2;
+ return Array.prototype.indexOf.call(document, true) === 1;
+ } finally {
+ delete document[1];
+ document.length = oldLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js
new file mode 100644
index 000000000..04882f5cc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-1-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js",
+
+description: "Array.prototype.indexOf applied to null throws a TypeError",
+
+test: function testcase() {
+ try {Array.prototype.indexOf.call(null)}
+ catch (e) {
+ if (e instanceof TypeError) return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js
new file mode 100644
index 000000000..3b8d05810
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js",
+
+ description: "Array.prototype.indexOf applied to boolean primitive",
+
+ test: function testcase() {
+ var targetObj = {};
+ try {
+ Boolean.prototype[1] = targetObj;
+ Boolean.prototype.length = 2;
+
+ return Array.prototype.indexOf.call(true, targetObj) === 1;
+ } finally {
+ delete Boolean.prototype[1];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js
new file mode 100644
index 000000000..a46e740a1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js",
+
+ description: "Array.prototype.indexOf applied to Boolean Object",
+
+ test: function testcase() {
+
+ var obj = new Boolean(false);
+ obj.length = 2;
+ obj[1] = true;
+
+ return Array.prototype.indexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js
new file mode 100644
index 000000000..44a694691
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js",
+
+ description: "Array.prototype.indexOf applied to number primitive",
+
+ test: function testcase() {
+ var targetObj = {};
+ try {
+ Number.prototype[1] = targetObj;
+ Number.prototype.length = 2;
+
+ return Array.prototype.indexOf.call(5, targetObj) === 1;
+ } finally {
+ delete Number.prototype[1];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js
new file mode 100644
index 000000000..da400811b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js",
+
+ description: "Array.prototype.indexOf applied to Number object",
+
+ test: function testcase() {
+
+ var obj = new Number(-3);
+ obj.length = 2;
+ obj[1] = true;
+
+ return Array.prototype.indexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js
new file mode 100644
index 000000000..d30f77379
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js",
+
+ description: "Array.prototype.indexOf applied to string primitive",
+
+ test: function testcase() {
+
+ return Array.prototype.indexOf.call("abc", "b") === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js
new file mode 100644
index 000000000..d9b09bc08
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js",
+
+ description: "Array.prototype.indexOf applied to String object",
+
+ test: function testcase() {
+
+ var obj = new String("null");
+
+ return Array.prototype.indexOf.call(obj, 'l') === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js
new file mode 100644
index 000000000..f4acf29f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.14-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js",
+
+ description: "Array.prototype.indexOf applied to Function object",
+
+ test: function testcase() {
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[1] = true;
+
+ return Array.prototype.indexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js
new file mode 100644
index 000000000..42eba295f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-10-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js",
+
+description: "Array.prototype.indexOf returns -1 for elements not present in array",
+
+test: function testcase() {
+ var a = new Array();
+ a[100] = 1;
+ a[99999] = "";
+ a[10] = new Object();
+ a[5555] = 5.5;
+ a[123456] = "str";
+ a[5] = 1E+309;
+ if (a.indexOf(1) !== 100 ||
+ a.indexOf("") !== 99999 ||
+ a.indexOf("str") !== 123456 ||
+ a.indexOf(1E+309) !== 5 || //Infinity
+ a.indexOf(5.5) !== 5555 )
+ {
+ return false;
+ }
+ if (a.indexOf(true) === -1 &&
+ a.indexOf(5) === -1 &&
+ a.indexOf("str1") === -1 &&
+ a.indexOf(null) === -1 &&
+ a.indexOf(new Object()) === -1)
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js
new file mode 100644
index 000000000..3dc984e29
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js",
+
+ description: "Array.prototype.indexOf - 'length' is own data property on an Array-like object",
+
+ test: function testcase() {
+ var objOne = { 1: true, length: 2 };
+ var objTwo = { 2: true, length: 2 };
+ return Array.prototype.indexOf.call(objOne, true) === 1 &&
+ Array.prototype.indexOf.call(objTwo, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js
new file mode 100644
index 000000000..cbaa11977
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js",
+
+ description: "Array.prototype.indexOf - 'length' is inherited accessor property",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var childOne = new Con();
+ childOne[1] = true;
+ var childTwo = new Con();
+ childTwo[2] = true;
+
+ return Array.prototype.indexOf.call(childOne, true) === 1 &&
+ Array.prototype.indexOf.call(childTwo, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js
new file mode 100644
index 000000000..bb4673603
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js",
+
+ description: "Array.prototype.indexOf - 'length' is own accessor property without a get function",
+
+ test: function testcase() {
+
+ var obj = { 1: true };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.indexOf.call(obj, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js
new file mode 100644
index 000000000..1fccc6a85
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js",
+
+ description: "Array.prototype.indexOf - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 20;
+ },
+ configurable: true
+ });
+
+ var obj = { 1: 1 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.indexOf.call(obj, 1) === -1;
+ } finally {
+ delete Object.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js
new file mode 100644
index 000000000..47fba55bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js",
+
+ description: "Array.prototype.indexOf - 'length' is inherited accessor property without a get function",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = true;
+
+ return Array.prototype.indexOf.call(child, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js
new file mode 100644
index 000000000..fd1ac04d2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js",
+
+ description: "Array.prototype.indexOf - 'length' is undefined property",
+
+ test: function testcase() {
+
+ var obj = { 0: true, 1: true };
+
+ return Array.prototype.indexOf.call(obj, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-16.js
new file mode 100644
index 000000000..385a41948
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-16.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-16.js",
+
+ description: "Array.prototype.indexOf - 'length' is property of the document host object",
+
+ test: function testcase() {
+ var targetObj = {};
+ try {
+ var oldLen = document.length;
+ document.length = 2;
+
+ document[1] = targetObj;
+ if (Array.prototype.indexOf.call(document, targetObj) !== 1) {
+ return false;
+ }
+
+ document[1] = {};
+ document[2] = targetObj;
+
+ return Array.prototype.indexOf.call(document, targetObj) === -1;
+ } finally {
+ delete document[1];
+ delete document[2];
+ document.length = oldLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js
new file mode 100644
index 000000000..8c09a1a4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js",
+
+ description: "Array.prototype.indexOf applied to Arguments object which implements its own property get method",
+
+ test: function testcase() {
+
+ var func = function (a, b) {
+ arguments[2] = false;
+ return Array.prototype.indexOf.call(arguments, true) === 1 &&
+ Array.prototype.indexOf.call(arguments, false) === -1;
+ };
+
+ return func(0, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js
new file mode 100644
index 000000000..3234a7b11
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js",
+
+ description: "Array.prototype.indexOf applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+ var str = new String("012");
+ try {
+ String.prototype[3] = "3";
+ return Array.prototype.indexOf.call(str, "2") === 2 &&
+ Array.prototype.indexOf.call(str, "3") === -1;
+ } finally {
+ delete String.prototype[3];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js
new file mode 100644
index 000000000..dc33da1bd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js",
+
+ description: "Array.prototype.indexOf applied to Function object which implements its own property get method",
+
+ test: function testcase() {
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[1] = "b";
+ obj[2] = "c";
+
+ return Array.prototype.indexOf.call(obj, obj[1]) === 1 &&
+ Array.prototype.indexOf.call(obj, obj[2]) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js
new file mode 100644
index 000000000..02d6897cc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js",
+
+ description: "Array.prototype.indexOf - 'length' is own data property on an Array",
+
+ test: function testcase() {
+ var targetObj = {};
+ try {
+ Array.prototype[2] = targetObj;
+
+ return [0, targetObj].indexOf(targetObj) === 1 &&
+ [0, 1].indexOf(targetObj) === -1;
+
+ } finally {
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-20.js
new file mode 100644
index 000000000..5e42d288c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-20.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-20.js",
+
+ description: "Array.prototype.indexOf applied to Function object which implements its own property get method",
+
+ test: function testcase() {
+
+ var obj = new Function("a", "b", "return a + b"); //value of obj length property will be 2;
+ obj[1] = "b";
+ obj[2] = "c";
+
+ return Array.prototype.indexOf.call(obj, obj[1]) === 1 &&
+ Array.prototype.indexOf.call(obj, obj[2]) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js
new file mode 100644
index 000000000..ee9f7ce1e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js",
+
+ description: "Array.prototype.indexOf - 'length' is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var proto = { length: 0 };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[1] = true;
+
+ return Array.prototype.indexOf.call(child, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js
new file mode 100644
index 000000000..8a03a5edc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js",
+
+ description: "Array.prototype.indexOf - 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var targetObj = {};
+ var arrProtoLen;
+
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+
+ return [0, targetObj].indexOf(targetObj) === 1;
+
+ } finally {
+
+ Array.prototype.length = arrProtoLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js
new file mode 100644
index 000000000..3568216a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js",
+
+ description: "Array.prototype.indexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 0;
+ },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+ child[1] = true;
+
+ return Array.prototype.indexOf.call(child, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js
new file mode 100644
index 000000000..e2162d7cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js",
+
+ description: "Array.prototype.indexOf - 'length' is an inherited data property",
+
+ test: function testcase() {
+ var proto = { length: 2 };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var childOne = new Con();
+ childOne[1] = true;
+ var childTwo = new Con();
+ childTwo[2] = true;
+
+ return Array.prototype.indexOf.call(childOne, true) === 1 &&
+ Array.prototype.indexOf.call(childTwo, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js
new file mode 100644
index 000000000..2e59761a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js",
+
+ description: "Array.prototype.indexOf - 'length' is own accessor property",
+
+ test: function testcase() {
+ var objOne = { 1: true };
+ var objTwo = { 2: true };
+ Object.defineProperty(objOne, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+ Object.defineProperty(objTwo, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.indexOf.call(objOne, true) === 1 &&
+ Array.prototype.indexOf.call(objTwo, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js
new file mode 100644
index 000000000..3148b4d4c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js",
+
+ description: "Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ var proto = { length: 0 };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = true;
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.indexOf.call(child, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js
new file mode 100644
index 000000000..ef4bd7dd2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js",
+
+ description: "Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 0;
+ },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = true;
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.indexOf.call(child, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js
new file mode 100644
index 000000000..6a658e466
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var obj = { 0: 1, 1: 1, length: undefined };
+
+ return Array.prototype.indexOf.call(obj, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js
new file mode 100644
index 000000000..1a948595b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is number primitive (value is NaN)",
+
+ test: function testcase() {
+
+ var obj = { 0: 0, length: NaN };
+
+ return Array.prototype.indexOf.call(obj, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js
new file mode 100644
index 000000000..5fad7ec95
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js",
+
+ description: "Array.prototype.indexOf - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+
+ var obj = { 1: 1, 2: 2, length: "2" };
+
+ return Array.prototype.indexOf.call(obj, 1) === 1 &&
+ Array.prototype.indexOf.call(obj, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js
new file mode 100644
index 000000000..0f5ad23cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js",
+
+ description: "Array.prototype.indexOf - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+
+ var obj = { 1: "true", 2: "2", length: "-4294967294" };
+
+ return Array.prototype.indexOf.call(obj, "true") === 1 &&
+ Array.prototype.indexOf.call(obj, "2") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js
new file mode 100644
index 000000000..fc4ea14fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js",
+
+ description: "Array.prototype.indexOf - 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+
+ var obj = { 199: true, 200: "200.59", length: "200.59" };
+
+ return Array.prototype.indexOf.call(obj, true) === 199 &&
+ Array.prototype.indexOf.call(obj, "200.59") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js
new file mode 100644
index 000000000..a523084a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js",
+
+ description: "Array.prototype.indexOf - 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var objOne = { 0: true, 1: true, length: "Infinity" };
+ var objTwo = { 0: true, 1: true, length: "+Infinity" };
+ var objThree = { 0: true, 1: true, length: "-Infinity" };
+
+ return Array.prototype.indexOf.call(objOne, true) === -1 &&
+ Array.prototype.indexOf.call(objTwo, true) === -1 &&
+ Array.prototype.indexOf.call(objThree, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js
new file mode 100644
index 000000000..681fd111a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js",
+
+ description: "Array.prototype.indexOf - 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+
+ var obj = { 1: true, 2: "2E0", length: "2E0" };
+
+ return Array.prototype.indexOf.call(obj, true) === 1 &&
+ Array.prototype.indexOf.call(obj, "2E0") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js
new file mode 100644
index 000000000..69f6d9be0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js",
+
+ description: "Array.prototype.indexOf - 'length' is a string containing a hex number",
+
+ test: function testcase() {
+
+ var obj = { 10: true, 11: "0x00B", length: "0x00B" };
+
+ return Array.prototype.indexOf.call(obj, true) === 10 &&
+ Array.prototype.indexOf.call(obj, "0x00B") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js
new file mode 100644
index 000000000..a027eb8a1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js",
+
+ description: "Array.prototype.indexOf - 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+
+ var obj = { 1: true, 2: "0002.0", length: "0002.0" };
+
+ return Array.prototype.indexOf.call(obj, true) === 1 &&
+ Array.prototype.indexOf.call(obj, "0002.0") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js
new file mode 100644
index 000000000..05ff3f1f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ var obj = { 0: true, 100: true, length: "one" };
+
+ return Array.prototype.indexOf.call(obj, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js
new file mode 100644
index 000000000..8cddaa25a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is an Object which has an own toString method.",
+
+ test: function testcase() {
+
+ // objects inherit the default valueOf() method from Object
+ // that simply returns itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ var obj = {
+ 1: true,
+ 2: 2,
+
+ length: {
+ toString: function () {
+ return '2';
+ }
+ }
+ };
+
+ return Array.prototype.indexOf.call(obj, true) === 1 &&
+ Array.prototype.indexOf.call(obj, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js
new file mode 100644
index 000000000..5e6b7b716
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js",
+
+ description: "Array.prototype.indexOf return -1 when 'length' is a boolean (value is true)",
+
+ test: function testcase() {
+ var obj = { 0: 0, 1: 1, length: true };
+ return Array.prototype.indexOf.call(obj, 0) === 0 &&
+ Array.prototype.indexOf.call(obj, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js
new file mode 100644
index 000000000..ce69db87c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is an Object which has an own valueOf method.",
+
+ test: function testcase() {
+
+ //valueOf method will be invoked first, since hint is Number
+ var obj = {
+ 1: true,
+ 2: 2,
+ length: {
+ valueOf: function () {
+ return 2;
+ }
+ }
+ };
+
+ return Array.prototype.indexOf.call(obj, true) === 1 &&
+ Array.prototype.indexOf.call(obj, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js
new file mode 100644
index 000000000..4850e2601
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js",
+
+ description: "Array.prototype.indexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var obj = {
+ 1: true,
+ length: {
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ return Array.prototype.indexOf.call(obj, true) === 1 && toStringAccessed && valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js
new file mode 100644
index 000000000..e70f49a27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js",
+
+ description: "Array.prototype.indexOf throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var obj = {
+ length: {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.indexOf.call(obj);
+ return false;
+ } catch (e) {
+ return toStringAccessed && valueOfAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js
new file mode 100644
index 000000000..c01b58ff6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js",
+
+ description: "Array.prototype.indexOf uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.toString = function () {
+ toStringAccessed = true;
+ return 2;
+ };
+
+ var obj = {
+ 1: true,
+ length: child
+ };
+
+ return Array.prototype.indexOf.call(obj, true) === 1 && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js
new file mode 100644
index 000000000..5c5e11051
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var obj = { 122: true, 123: false, length: 123.321 }; //length will be 123 finally
+
+ return Array.prototype.indexOf.call(obj, true) === 122 &&
+ Array.prototype.indexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js
new file mode 100644
index 000000000..06c9f8ea7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var obj = { 1: true, 2: false, length: -4294967294.5 }; //length will be 2 finally
+
+ return Array.prototype.indexOf.call(obj, true) === 1 &&
+ Array.prototype.indexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js
new file mode 100644
index 000000000..6ec076778
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+ var targetObj = {};
+ var obj = {
+ 0: targetObj,
+ 4294967294: targetObj,
+ 4294967295: targetObj,
+ length: 4294967296
+ };
+
+ return Array.prototype.indexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js
new file mode 100644
index 000000000..397fae9ec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+ var targetObj = {};
+ var obj = {
+ 0: targetObj,
+ 1: 4294967297,
+ length: 4294967297
+ };
+
+ return Array.prototype.indexOf.call(obj, targetObj) === 0 &&
+ Array.prototype.indexOf.call(obj, 4294967297) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js
new file mode 100644
index 000000000..d0da0394d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var obj = { 0: true, length: 0 };
+
+ return Array.prototype.indexOf.call(obj, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js
new file mode 100644
index 000000000..b89cae651
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var obj = { 0: true, length: +0 };
+
+ return Array.prototype.indexOf.call(obj, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js
new file mode 100644
index 000000000..479f9c5cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var obj = { 0: true, length: -0 };
+
+ return Array.prototype.indexOf.call(obj, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js
new file mode 100644
index 000000000..e308bbbe0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a number (value is positive)",
+
+ test: function testcase() {
+
+ var obj = { 3: true, 4: false, length: 4 };
+
+ return Array.prototype.indexOf.call(obj, true) === 3 &&
+ Array.prototype.indexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js
new file mode 100644
index 000000000..adc32f664
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a number (value is negative)",
+
+ test: function testcase() {
+
+ var obj = { 4: true, 5: false, length: 5 - Math.pow(2, 32) };
+
+ return Array.prototype.indexOf.call(obj, true) === 4 &&
+ Array.prototype.indexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js
new file mode 100644
index 000000000..fd1e33e58
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var obj = { 0: 0, length: Infinity };
+
+ return Array.prototype.indexOf.call(obj, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js
new file mode 100644
index 000000000..f3abd2d98
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js",
+
+ description: "Array.prototype.indexOf - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var obj = { 0: 0, length: -Infinity };
+
+ return Array.prototype.indexOf.call(obj, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js
new file mode 100644
index 000000000..4f9d9fc35
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 (empty array)",
+
+test: function testcase() {
+ var i = [].indexOf(42);
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js
new file mode 100644
index 000000000..cf53e080c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js",
+
+ description: "Array.prototype.indexOf - 'length' is a number of value -6e-1",
+
+ test: function testcase() {
+ var targetObj = [];
+ var obj = { 0: targetObj, 100: targetObj, length: -6e-1 };
+ return Array.prototype.indexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js
new file mode 100644
index 000000000..0d9ce6381
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js",
+
+ description: "Array.prototype.indexOf - 'length' is an empty string",
+
+ test: function testcase() {
+ var targetObj = [];
+ var obj = { 0: targetObj, 100: targetObj, length: "" };
+ return Array.prototype.indexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js
new file mode 100644
index 000000000..319f332e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion))",
+
+test: function testcase() {
+
+ var i = Array.prototype.indexOf.call({length: null}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js
new file mode 100644
index 000000000..bc8232d7c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 (length overridden to false (type conversion))",
+
+test: function testcase() {
+
+ var i = Array.prototype.indexOf.call({length: false}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js
new file mode 100644
index 000000000..b3c1432dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 (generic 'array' with length 0 )",
+
+test: function testcase() {
+
+ var i = Array.prototype.lastIndexOf.call({length: 0}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js
new file mode 100644
index 000000000..221bfb422
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion))",
+
+test: function testcase() {
+
+ var i = Array.prototype.indexOf.call({length: '0'}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js
new file mode 100644
index 000000000..153a201d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+
+ var i = Array.prototype.indexOf.call({length: { valueOf: function () { return 0;}}}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js
new file mode 100644
index 000000000..8639579ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ var i = Array.prototype.indexOf.call({length: { toString: function () { return '0';}}}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js
new file mode 100644
index 000000000..715b20599
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-4-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js",
+
+description: "Array.prototype.indexOf returns -1 if 'length' is 0 (length is an empty array)",
+
+test: function testcase() {
+
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+ var i = Array.prototype.indexOf.call({length: [ ]}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js
new file mode 100644
index 000000000..d419a1d59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js",
+
+ description: "Array.prototype.indexOf - 'length' is a number of value 0.1",
+
+ test: function testcase() {
+ var targetObj = [];
+ var obj = { 0: targetObj, 100: targetObj, length: 0.1 };
+ return Array.prototype.indexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js
new file mode 100644
index 000000000..e3945deb6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-5-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js",
+
+description: "Array.prototype.indexOf when fromIndex is string",
+
+test: function testcase() {
+ var a = [1,2,1,2,1,2];
+ if (a.indexOf(2,"2") === 3 && // "2" resolves to 2
+ a.indexOf(2,"one") === 1) { // "one" resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js
new file mode 100644
index 000000000..6c5fdabae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is positive number)",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, 2].indexOf(targetObj, 2) === -1 &&
+ [0, 1, targetObj].indexOf(targetObj, 2) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js
new file mode 100644
index 000000000..cbc1e395c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is negative number)",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, 2].indexOf(targetObj, -1) === -1 &&
+ [0, 1, targetObj].indexOf(targetObj, -1) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js
new file mode 100644
index 000000000..822227e25
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is Infinity)",
+
+ test: function testcase() {
+ var arr = [];
+ arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type
+ return arr.indexOf(true, Infinity) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js
new file mode 100644
index 000000000..8f628c58f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ return [true].indexOf(true, -Infinity) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js
new file mode 100644
index 000000000..9e47c2d1c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ return [true].indexOf(true, NaN) === 0 && [true].indexOf(true, -NaN) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js
new file mode 100644
index 000000000..77843d427
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a string containing a negative number",
+
+ test: function testcase() {
+
+ return [0, true, 2].indexOf(true, "-1") === -1 &&
+ [0, 1, true].indexOf(true, "-1") === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js
new file mode 100644
index 000000000..287d199dc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a string containing Infinity",
+
+ test: function testcase() {
+ var arr = [];
+ arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type
+ return arr.indexOf(true, "Infinity") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js
new file mode 100644
index 000000000..e961c976d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a string containing -Infinity",
+
+ test: function testcase() {
+
+ return [true].indexOf(true, "-Infinity") === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js
new file mode 100644
index 000000000..a27465ddf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a string containing an exponential number",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0") === -1 &&
+ [0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0") === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js
new file mode 100644
index 000000000..bb6c89768
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a string containing a hex number",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003") === -1 &&
+ [0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003") === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js
new file mode 100644
index 000000000..0e0e694eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js",
+
+description: "Array.prototype.indexOf when fromIndex is floating point number",
+
+test: function testcase() {
+ var a = new Array(1,2,3);
+ if (a.indexOf(3,0.49) === 2 && // 0.49 resolves to 0
+ a.indexOf(1,0.51) === 0 && // 0.51 resolves to 0
+ a.indexOf(1,1.51) === -1) { // 1.01 resolves to 1
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js
new file mode 100644
index 000000000..0b1b3c7dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' which is a string containing a number with leading zeros",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10") === -1 &&
+ [0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10") === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js
new file mode 100644
index 000000000..599e72eba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own toString method",
+
+ test: function testcase() {
+
+ // objects inherit the default valueOf() method from Object
+ // that simply returns itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ var fromIndex = {
+ toString: function () {
+ return '1';
+ }
+ };
+
+ return [0, true].indexOf(true, fromIndex) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js
new file mode 100644
index 000000000..ba673c249
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own valueOf method",
+
+ test: function testcase() {
+
+ var fromIndex = {
+ valueOf: function () {
+ return 1;
+ }
+ };
+
+
+ return [0, true].indexOf(true, fromIndex) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js
new file mode 100644
index 000000000..33cb48db2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var fromIndex = {
+ toString: function () {
+ toStringAccessed = true;
+ return '1';
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ };
+
+ return [0, true].indexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js
new file mode 100644
index 000000000..4f1b7ef69
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js",
+
+ description: "Array.prototype.indexOf throws TypeError exception when value of 'fromIndex' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+ var fromIndex = {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ };
+
+ try {
+ [0, true].indexOf(true, fromIndex);
+ return false;
+ } catch (e) {
+ return toStringAccessed && valueOfAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js
new file mode 100644
index 000000000..aa4eecb3a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js",
+
+ description: "Array.prototype.indexOf uses inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 1;
+ }
+ };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.toString = function () {
+ toStringAccessed = true;
+ return 2;
+ };
+
+ return [0, true].indexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js
new file mode 100644
index 000000000..c33d5a794
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js",
+
+ description: "Array.prototype.indexOf - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+ var stepTwoOccurs = false;
+ var stepFiveOccurs = false;
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ stepTwoOccurs = true;
+ if (stepFiveOccurs) {
+ throw new Error("Step 5 occurred out of order");
+ }
+ return 20;
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.indexOf.call(obj, undefined, fromIndex);
+ return stepTwoOccurs && stepFiveOccurs;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js
new file mode 100644
index 000000000..1a08e86ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js",
+
+ description: "Array.prototype.indexOf - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+ var stepThreeOccurs = false;
+ var stepFiveOccurs = false;
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ valueOf: function () {
+ stepThreeOccurs = true;
+ if (stepFiveOccurs) {
+ throw new Error("Step 5 occurred out of order");
+ }
+ return 20;
+ }
+ };
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.indexOf.call(obj, undefined, fromIndex);
+ return stepThreeOccurs && stepFiveOccurs;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js
new file mode 100644
index 000000000..6e908e9a8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js",
+
+ description: "Array.prototype.indexOf - side effects produced by step 1 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepFiveOccurs = false;
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.indexOf.call(undefined, undefined, fromIndex);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError) && !stepFiveOccurs;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js
new file mode 100644
index 000000000..99e9c937f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js",
+
+ description: "Array.prototype.indexOf - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepFiveOccurs = false;
+
+ var obj = {};
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new RangeError();
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.indexOf.call(obj, undefined, fromIndex);
+ return false;
+ } catch (e) {
+ return (e instanceof RangeError) && !stepFiveOccurs;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js
new file mode 100644
index 000000000..459f2f005
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js",
+
+description: "Array.prototype.indexOf when fromIndex is boolean",
+
+test: function testcase() {
+ var a = [1,2,3];
+ if (a.indexOf(1,true) === -1 && // true resolves to 1
+ a.indexOf(1,false) === 0 ) { // false resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js
new file mode 100644
index 000000000..dd3be94af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-30",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js",
+
+ description: "Array.prototype.indexOf - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepFiveOccurs = false;
+
+ var obj = {};
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ valueOf: function () {
+ throw new TypeError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.indexOf.call(obj, undefined, fromIndex);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError) && !stepFiveOccurs;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js
new file mode 100644
index 000000000..4adabc6ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-31",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js",
+
+ description: "Array.prototype.indexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, 2].indexOf(targetObj, 2.5) === -1 &&
+ [0, 1, targetObj].indexOf(targetObj, 2.5) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js
new file mode 100644
index 000000000..99a80e265
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-32",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js",
+
+ description: "Array.prototype.indexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, 2].indexOf(targetObj, -1.5) === -1 &&
+ [0, 1, targetObj].indexOf(targetObj, -1.5) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js
new file mode 100644
index 000000000..47ab681d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-33",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js",
+
+ description: "Array.prototype.indexOf match on the first element, a middle element and the last element when 'fromIndex' is passed",
+
+ test: function testcase() {
+
+ return [0, 1, 2, 3, 4].indexOf(0, 0) === 0 &&
+ [0, 1, 2, 3, 4].indexOf(2, 1) === 2 &&
+ [0, 1, 2, 3, 4].indexOf(2, 2) === 2 &&
+ [0, 1, 2, 3, 4].indexOf(4, 2) === 4 &&
+ [0, 1, 2, 3, 4].indexOf(4, 4) === 4;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js
new file mode 100644
index 000000000..570445fd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js",
+
+description: "Array.prototype.indexOf returns 0 if fromIndex is 'undefined'",
+
+test: function testcase() {
+ var a = [1,2,3];
+ if (a.indexOf(1,undefined) === 0) { // undefined resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js
new file mode 100644
index 000000000..60afa9ce4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js",
+
+description: "Array.prototype.indexOf returns 0 if fromIndex is null",
+
+test: function testcase() {
+ var a = [1,2,3];
+ if (a.indexOf(1,null) === 0 ) { // null resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js
new file mode 100644
index 000000000..7ded3b36f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js",
+
+ description: "Array.prototype.indexOf - 'fromIndex' isn't passed",
+
+ test: function testcase() {
+ var arr = [0, 1, 2, 3, 4];
+ //'fromIndex' will be set as 0 if not passed by default
+ return arr.indexOf(0) === arr.indexOf(0, 0) &&
+ arr.indexOf(2) === arr.indexOf(2, 0) &&
+ arr.indexOf(4) === arr.indexOf(4, 0);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js
new file mode 100644
index 000000000..589475ca7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is 0)",
+
+ test: function testcase() {
+
+ return [true].indexOf(true, 0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js
new file mode 100644
index 000000000..052af7364
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is +0)",
+
+ test: function testcase() {
+
+ return [true].indexOf(true, +0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js
new file mode 100644
index 000000000..749167b2d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js",
+
+ description: "Array.prototype.indexOf - value of 'fromIndex' is a number (value is -0)",
+
+ test: function testcase() {
+
+ return [true].indexOf(true, -0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js
new file mode 100644
index 000000000..511ab4598
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-6-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js",
+
+description: "Array.prototype.indexOf returns -1 if fromIndex is greater than Array length",
+
+test: function testcase() {
+ var a = [1,2,3];
+ if (a.indexOf(1,5) === -1 &&
+ a.indexOf(1,3) === -1 &&
+ [ ].indexOf(1,0) === -1 ){
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js
new file mode 100644
index 000000000..67dc11523
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-7-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js",
+
+ description: "Array.prototype.indexOf returns -1 when 'fromIndex' is length of array - 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].indexOf(1, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js
new file mode 100644
index 000000000..f0f900738
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-7-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js",
+
+ description: "Array.prototype.indexOf returns correct index when 'fromIndex' is length of array - 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].indexOf(3, 2) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js
new file mode 100644
index 000000000..de96757c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-7-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js",
+
+ description: "Array.prototype.indexOf returns -1 when 'fromIndex' and 'length' are both 0",
+
+ test: function testcase() {
+
+ return [].indexOf(1, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js
new file mode 100644
index 000000000..ded6843e0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-7-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js",
+
+ description: "Array.prototype.indexOf returns -1 when 'fromIndex' is 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].indexOf(1, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js
new file mode 100644
index 000000000..a54936f91
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-7-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js",
+
+ description: "Array.prototype.indexOf returns correct index when 'fromIndex' is 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].indexOf(2, 1) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js
new file mode 100644
index 000000000..ce8ef36b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-8-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js",
+
+description: "Array.prototype.indexOf with negative fromIndex",
+
+test: function testcase() {
+ var a = new Array(1,2,3);
+
+ if (a.indexOf(2,-1) === -1 &&
+ a.indexOf(2,-2) === 1 &&
+ a.indexOf(1,-3) === 0 &&
+ a.indexOf(1,-5.3) === 0 ) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js
new file mode 100644
index 000000000..d4e2c0102
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-8-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js",
+
+ description: "Array.prototype.indexOf returns correct index when 'fromIndex' is -1",
+
+ test: function testcase() {
+
+ return [1, 2, 3, 4].indexOf(4, -1) === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js
new file mode 100644
index 000000000..f66bdb5b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-8-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js",
+
+ description: "Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array - 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3, 4].indexOf(1, -3) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js
new file mode 100644
index 000000000..32ef21e2d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-8-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js",
+
+ description: "Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array",
+
+ test: function testcase() {
+
+ return [1, 2, 3, 4].indexOf(0, -4) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js
new file mode 100644
index 000000000..aa657b083
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js",
+
+description: "Array.prototype.indexOf must return correct index (boolean)",
+
+test: function testcase() {
+ var obj = {toString:function (){return true}};
+ var _false = false;
+ var a = [obj,"true", undefined,0,_false,null,1,"str",0,1,true,false,true,false];
+ if (a.indexOf(true) === 10 && //a[10]=true
+ a.indexOf(false) === 4) //a[4] =_false
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js
new file mode 100644
index 000000000..e5b5bea4e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/** note that prior to the finally ES5 draft SameValue was used for comparisions
+and hence NaNs could be found using indexOf **/
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-10",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js",
+
+description: "Array.prototype.indexOf must return correct index (NaN)",
+
+test: function testcase() {
+ var _NaN = NaN;
+ var a = new Array("NaN",undefined,0,false,null,{toString:function (){return NaN}},"false",_NaN,NaN);
+ if (a.indexOf(NaN) === -1) // NaN is equal to nothing, including itself.
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js
new file mode 100644
index 000000000..e4f445742
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js",
+
+description: "Array.prototype.indexOf must return correct index (Number)",
+
+test: function testcase() {
+ var obj = {toString:function (){return 0}};
+ var one = 1;
+ var _float = -(4/3);
+ var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3));
+ if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3)
+ a.indexOf(0) === 7 && // a[7] = +0, 0===+0
+ a.indexOf(-0) === 7 && // a[7] = +0, -0===+0
+ a.indexOf(1) === 10 ) // a[10] =one=== 1
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js
new file mode 100644
index 000000000..a0c9bdb16
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js",
+
+description: "Array.prototype.indexOf must return correct index(string)",
+
+test: function testcase() {
+ var obj = {toString:function (){return "false"}};
+ var szFalse = "false";
+ var a = new Array("false1",undefined,0,false,null,1,obj,0,szFalse, "false");
+ if (a.indexOf("false") === 8) //a[8]=szFalse
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js
new file mode 100644
index 000000000..03d3ec127
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js",
+
+description: "Array.prototype.indexOf must return correct index(undefined)",
+
+test: function testcase() {
+ var obj = {toString:function (){return undefined;}};
+ var _undefined1 = undefined;
+ var _undefined2;
+ var a = new Array(true,0,false,null,1,"undefined",obj,1,_undefined2,_undefined1,undefined);
+ if (a.indexOf(undefined) === 8) //a[8]=_undefined2
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js
new file mode 100644
index 000000000..dbbf52033
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js",
+
+description: "Array.prototype.indexOf must return correct index (Object)",
+
+test: function testcase() {
+ var obj1 = {toString:function (){return "false"}};
+ var obj2 = {toString:function (){return "false"}};
+ var obj3 = obj1;
+ var a = new Array(false,undefined,0,false,null,{toString:function (){return "false"}},"false",obj2,obj1,obj3);
+ if (a.indexOf(obj3) === 8) //a[8] = obj1;
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js
new file mode 100644
index 000000000..886b92b4d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js",
+
+description: "Array.prototype.indexOf must return correct index(null)",
+
+test: function testcase() {
+ var obj = {toString:function (){return null}};
+ var _null = null;
+ var a = new Array(true,undefined,0,false,_null,1,"str",0,1,obj,true,false,null);
+ if (a.indexOf(null) === 4 ) //a[4]=_null
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js
new file mode 100644
index 000000000..fb6e4ef29
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js",
+
+description: "Array.prototype.indexOf must return correct index (self reference)",
+
+test: function testcase() {
+ var a = new Array(0,1,2,3);
+ a[2] = a;
+ if (a.indexOf(a) === 2 &&
+ a.indexOf(3) === 3 )
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js
new file mode 100644
index 000000000..fd8fc637e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js",
+
+description: "Array.prototype.indexOf must return correct index (Array)",
+
+test: function testcase() {
+ var b = new Array("0,1");
+ var a = new Array(0,b,"0,1",3);
+ if (a.indexOf(b.toString()) === 2 &&
+ a.indexOf("0,1") === 2 )
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js
new file mode 100644
index 000000000..368d91aaa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.14-9-9",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js",
+
+description: "Array.prototype.indexOf must return correct index (Sparse Array)",
+
+test: function testcase() {
+ var a = new Array(0,1);
+ a[4294967294] = 2; // 2^32-2 - is max array element
+ a[4294967295] = 3; // 2^32-1 added as non-array element property
+ a[4294967296] = 4; // 2^32 added as non-array element property
+ a[4294967297] = 5; // 2^32+1 added as non-array element property
+
+ // start searching near the end so in case implementation actually tries to test all missing elements!!
+ return (a.indexOf(2,4294967290 ) === 4294967294 &&
+ a.indexOf(3,4294967290) === -1 &&
+ a.indexOf(4,4294967290) === -1 &&
+ a.indexOf(5,4294967290) === -1 ) ;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js
new file mode 100644
index 000000000..a7e8a4a12
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-a-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js",
+
+ description: "Array.prototype.indexOf - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var arr = { };
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ arr[2] = "length";
+ return 3;
+ },
+ configurable: true
+ });
+
+ return 2 === Array.prototype.indexOf.call(arr, "length");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js
new file mode 100644
index 000000000..805f65757
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-a-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js",
+
+ description: "Array.prototype.indexOf - added properties in step 5 are visible here on an Array-like object",
+
+ test: function testcase() {
+
+ var arr = { length: 30 };
+ var targetObj = function () { };
+
+ var fromIndex = {
+ valueOf: function () {
+ arr[4] = targetObj;
+ return 3;
+ }
+ };
+
+ return 4 === Array.prototype.indexOf.call(arr, targetObj, fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js
new file mode 100644
index 000000000..1e5aabbc9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-a-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js",
+
+ description: "Array.prototype.indexOf - added properties in step 5 are visible here on an Array",
+
+ test: function testcase() {
+
+ var arr = [];
+ arr.length = 30;
+ var targetObj = function () { };
+
+ var fromIndex = {
+ valueOf: function () {
+ arr[4] = targetObj;
+ return 3;
+ }
+ };
+
+ return 4 === arr.indexOf(targetObj, fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js
new file mode 100644
index 000000000..039e933c7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-a-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js",
+
+ description: "Array.prototype.indexOf - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var arr = { 2: 6.99 };
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ delete arr[2];
+ return 3;
+ },
+ configurable: true
+ });
+
+ return -1 === Array.prototype.indexOf.call(arr, 6.99);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js
new file mode 100644
index 000000000..cd77a3270
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-a-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js",
+
+ description: "Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array-like object",
+
+ test: function testcase() {
+
+ var arr = { 10: false, length: 30 };
+
+ var fromIndex = {
+ valueOf: function () {
+ delete arr[10];
+ return 3;
+ }
+ };
+
+ return -1 === Array.prototype.indexOf.call(arr, false, fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js
new file mode 100644
index 000000000..d2a61274c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-a-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js",
+
+ description: "Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array",
+
+ test: function testcase() {
+
+ var arr = [];
+ arr[10] = "10";
+ arr.length = 20;
+
+ var fromIndex = {
+ valueOf: function () {
+ delete arr[10];
+ return 3;
+ }
+ };
+
+ return -1 === arr.indexOf("10", fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js
new file mode 100644
index 000000000..466abfffd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js",
+
+ description: "Array.prototype.indexOf - non-existent property wouldn't be called",
+
+ test: function testcase() {
+
+ return [0, , 2].indexOf(undefined) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js
new file mode 100644
index 000000000..270be418d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js",
+
+ description: "Array.prototype.indexOf - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+ var obj = { 0: 0, 1: 1, 2: 2, length: 3 };
+ return Array.prototype.indexOf.call(obj, 0) === 0 &&
+ Array.prototype.indexOf.call(obj, 1) === 1 &&
+ Array.prototype.indexOf.call(obj, 2) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js
new file mode 100644
index 000000000..693370e33
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js",
+
+ description: "Array.prototype.indexOf - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+ return [true, true, true].indexOf(true) === 0 &&
+ [false, true, true].indexOf(true) === 1 &&
+ [false, false, true].indexOf(true) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-24.js
new file mode 100644
index 000000000..c8e9cba5d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-24.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-24.js",
+
+ description: "Array.prototype.indexOf - This object is the document host object",
+
+ test: function testcase() {
+
+ var targetObj = {};
+ try {
+ var oldLen = document.length;
+ document[0] = targetObj;
+ document[100] = "100";
+ document[200] = "200";
+ document.length = 200;
+ return 0 === Array.prototype.indexOf.call(document, targetObj) &&
+ 100 === Array.prototype.indexOf.call(document, "100") &&
+ -1 === Array.prototype.indexOf.call(document, "200");
+ } finally {
+ delete document[0];
+ delete document[100];
+ delete document[200];
+ document.length = oldLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js
new file mode 100644
index 000000000..84889ee50
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js",
+
+ description: "Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var func = function (a, b) {
+ return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) &&
+ -1 === Array.prototype.indexOf.call(arguments, arguments[1]);
+ };
+
+ return func(true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js
new file mode 100644
index 000000000..27a3920d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js",
+
+ description: "Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters)",
+
+ test: function testcase() {
+
+ var func = function (a, b) {
+ return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) &&
+ 1 === Array.prototype.indexOf.call(arguments, arguments[1]) &&
+ -1 === Array.prototype.indexOf.call(arguments, arguments[2]);
+ };
+
+ return func(0, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js
new file mode 100644
index 000000000..badf19d6f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js",
+
+ description: "Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var func = function (a, b) {
+ return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) &&
+ 3 === Array.prototype.indexOf.call(arguments, arguments[3]) &&
+ -1 === Array.prototype.indexOf.call(arguments, arguments[4]);
+ };
+
+ return func(0, false, 0, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js
new file mode 100644
index 000000000..eec32c0db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js",
+
+ description: "Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+ try {
+ Array.prototype[0] = false;
+ return [true].indexOf(true) === 0;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js
new file mode 100644
index 000000000..eaaf8b661
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js",
+
+ description: "Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ try {
+ Object.prototype[0] = false;
+ return 0 === Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true);
+ } finally {
+ delete Object.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js
new file mode 100644
index 000000000..6ba3950bd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js",
+
+ description: "Array.prototype.indexOf - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+ try {
+ Array.prototype[0] = true;
+ Array.prototype[1] = false;
+ Array.prototype[2] = "true";
+ return 0 === [, , , ].indexOf(true) &&
+ 1 === [, , , ].indexOf(false) &&
+ 2 === [, , , ].indexOf("true");
+ } finally {
+ delete Array.prototype[0];
+ delete Array.prototype[1];
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js
new file mode 100644
index 000000000..c9d9c8efb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js",
+
+ description: "Array.prototype.indexOf - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ try {
+ Object.prototype[0] = true;
+ Object.prototype[1] = false;
+ Object.prototype[2] = "true";
+ return 0 === Array.prototype.indexOf.call({ length: 3 }, true) &&
+ 1 === Array.prototype.indexOf.call({ length: 3 }, false) &&
+ 2 === Array.prototype.indexOf.call({ length: 3 }, "true");
+ } finally {
+ delete Object.prototype[0];
+ delete Object.prototype[1];
+ delete Object.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js
new file mode 100644
index 000000000..10a568899
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js",
+
+ description: "Array.prototype.indexOf - type of array element is different from type of search element",
+
+ test: function testcase() {
+
+ return ["true"].indexOf(true) === -1 &&
+ ["0"].indexOf(0) === -1 &&
+ [false].indexOf(0) === -1 &&
+ [undefined].indexOf(0) === -1 &&
+ [null].indexOf(0) === -1 &&
+ [[]].indexOf(0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js
new file mode 100644
index 000000000..1df366452
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js",
+
+ description: "Array.prototype.indexOf - both array element and search element are Boolean type, and they have same value",
+ test: function testcase() {
+
+ return [false, true].indexOf(true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js
new file mode 100644
index 000000000..6f22edbd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js",
+
+ description: "Array.prototype.indexOf - both array element and search element are Object type, and they refer to the same object",
+ test: function testcase() {
+
+ var obj1 = {};
+ var obj2 = {};
+ var obj3 = obj2;
+ return [{}, obj1, obj2].indexOf(obj3) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js
new file mode 100644
index 000000000..c8f5766db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js",
+
+ description: "Array.prototype.indexOf - both type of array element and type of search element are Undefined",
+
+ test: function testcase() {
+
+ return [undefined].indexOf() === 0 && [undefined].indexOf(undefined) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js
new file mode 100644
index 000000000..4a52228e4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js",
+
+ description: "Array.prototype.indexOf - both type of array element and type of search element are null",
+
+ test: function testcase() {
+
+ return [null].indexOf(null) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js
new file mode 100644
index 000000000..31dcd8584
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js",
+
+ description: "Array.prototype.indexOf - search element is NaN",
+ test: function testcase() {
+
+ return [+NaN, NaN, -NaN].indexOf(NaN) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js
new file mode 100644
index 000000000..982c51024
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js",
+
+ description: "Array.prototype.indexOf - search element is -NaN",
+ test: function testcase() {
+
+ return [+NaN, NaN, -NaN].indexOf(-NaN) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js
new file mode 100644
index 000000000..b7b2a8dbd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js",
+
+ description: "Array.prototype.indexOf - array element is +0 and search element is -0",
+ test: function testcase() {
+
+ return [+0].indexOf(-0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js
new file mode 100644
index 000000000..f9d0895ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js",
+
+ description: "Array.prototype.indexOf - array element is -0 and search element is +0",
+ test: function testcase() {
+
+ return [-0].indexOf(+0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js
new file mode 100644
index 000000000..f64380c99
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js",
+
+ description: "Array.prototype.indexOf - both array element and search element are Number, and they have same value",
+ test: function testcase() {
+
+ return [-1, 0, 1].indexOf(1) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js
new file mode 100644
index 000000000..7c2a1fbaf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js",
+
+ description: "Array.prototype.indexOf - both array element and search element are String, and they have exactly the same sequence of characters",
+ test: function testcase() {
+
+ return ["", "ab", "bca", "abc"].indexOf("abc") === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js
new file mode 100644
index 000000000..7f30a9b0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.14-9-b-iii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js",
+
+ description: "Array.prototype.indexOf - returns index of last one when more than two elements in array are eligible",
+
+ test: function testcase() {
+
+ return [1, 2, 2, 1, 2].indexOf(2) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.indexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js
new file mode 100644
index 000000000..55ae3ab20
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js",
+
+description: "Array.prototype.lastIndexOf must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.lastIndexOf;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js
new file mode 100644
index 000000000..54bdd4911
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js",
+
+description: "Array.prototype.lastIndexOf has a length property whose value is 1.",
+
+test: function testcase() {
+ if (Array.prototype.lastIndexOf.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js
new file mode 100644
index 000000000..0ebf2da1e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js",
+
+ description: "Array.prototype.lastIndexOf applied to undefined throws a TypeError",
+
+ test: function testcase() {
+
+ try {
+ Array.prototype.lastIndexOf.call(undefined);
+ return false;
+ } catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js
new file mode 100644
index 000000000..409433e00
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js",
+
+ description: "Array.prototype.lastIndexOf applied to the Math object",
+
+ test: function testcase() {
+
+ try {
+ Math.length = 2;
+ Math[1] = 100;
+ return 1 === Array.prototype.lastIndexOf.call(Math, 100);
+ } finally {
+ delete Math.length;
+ delete Math[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js
new file mode 100644
index 000000000..58b7b7650
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js",
+
+ description: "Array.prototype.lastIndexOf applied to Date object",
+
+ test: function testcase() {
+
+ var obj = new Date();
+ obj.length = 2;
+ obj[1] = true;
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js
new file mode 100644
index 000000000..85d976a32
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js",
+
+ description: "Array.prototype.lastIndexOf applied to RegExp object",
+
+ test: function testcase() {
+
+ var obj = new RegExp("afdasf");
+ obj.length = 100;
+ obj[1] = "afdasf";
+
+ return Array.prototype.lastIndexOf.call(obj, "afdasf") === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js
new file mode 100644
index 000000000..f91c72f09
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js",
+
+ description: "Array.prototype.lastIndexOf applied to the JSON object",
+
+ test: function testcase() {
+
+ var targetObj = {};
+ try {
+ JSON[3] = targetObj;
+ JSON.length = 5;
+ return 3 === Array.prototype.lastIndexOf.call(JSON, targetObj);
+ } finally {
+ delete JSON[3];
+ delete JSON.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js
new file mode 100644
index 000000000..477c0b69a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js",
+
+ description: "Array.prototype.lastIndexOf applied to Error object",
+
+ test: function testcase() {
+
+ var obj = new SyntaxError();
+ obj.length = 2;
+ obj[1] = Infinity;
+
+ return Array.prototype.lastIndexOf.call(obj, Infinity) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js
new file mode 100644
index 000000000..d68b7e526
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js",
+
+ description: "Array.prototype.lastIndexOf applied to the Arguments object",
+
+ test: function testcase() {
+
+ var obj = (function fun() {
+ return arguments;
+ }(1, 2, 3));
+
+ return Array.prototype.lastIndexOf.call(obj, 2) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-16.js
new file mode 100644
index 000000000..f0f206c08
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-16.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the stepFiveOccursation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-16.js",
+
+ description: "Array.prototype.lastIndexOf applied to the document host object",
+
+ test: function testcase() {
+
+ var targetObj = ["document"];
+ try {
+ var oldLen = document.length;
+ document[5] = targetObj;
+ document.length = 100;
+ return 5 === Array.prototype.lastIndexOf.call(document, targetObj);
+ } finally {
+ delete document[5];
+ document.length = oldLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js
new file mode 100644
index 000000000..94c81443b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js",
+
+ description: "Array.prototype.lastIndexOf applied to null throws a TypeError",
+
+ test: function testcase() {
+
+ try {
+ Array.prototype.lastIndexOf.call(null);
+ return false;
+ } catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js
new file mode 100644
index 000000000..59c76d72e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js",
+
+ description: "Array.prototype.lastIndexOf applied to boolean primitive",
+
+ test: function testcase() {
+
+ try {
+ Boolean.prototype[1] = true;
+ Boolean.prototype.length = 2;
+
+ return 1 === Array.prototype.lastIndexOf.call(true, true);
+ } finally {
+ delete Boolean.prototype[1];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js
new file mode 100644
index 000000000..1b0728bf1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js",
+
+ description: "Array.prototype.lastIndexOf applied to Boolean object",
+
+ test: function testcase() {
+
+ var obj = new Boolean(false);
+ obj.length = 2;
+ obj[1] = true;
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js
new file mode 100644
index 000000000..33a0b9b7f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js",
+
+ description: "Array.prototype.lastIndexOf applied to number primitive",
+
+ test: function testcase() {
+
+ try {
+ Number.prototype[1] = isNaN;
+ Number.prototype.length = 2;
+ return 1 === Array.prototype.lastIndexOf.call(5, isNaN);
+ } finally {
+ delete Number.prototype[1];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js
new file mode 100644
index 000000000..138326fa1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js",
+
+ description: "Array.prototype.lastIndexOf applied to Number object",
+
+ test: function testcase() {
+
+ var obj = new Number(-3);
+ obj.length = 2;
+ obj[1] = true;
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js
new file mode 100644
index 000000000..9b238ca7a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js",
+
+ description: "Array.prototype.lastIndexOf applied to string primitive",
+
+ test: function testcase() {
+
+ return Array.prototype.lastIndexOf.call("abc", "c") === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js
new file mode 100644
index 000000000..a6a5b9769
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js",
+
+ description: "Array.prototype.lastIndexOf applied to String object",
+
+ test: function testcase() {
+
+ var obj = new String("undefined");
+
+ return Array.prototype.lastIndexOf.call(obj, "f") === 4;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js
new file mode 100644
index 000000000..74bbd4235
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js",
+
+ description: "Array.prototype.lastIndexOf applied to Function object",
+
+ test: function testcase() {
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[1] = true;
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js
new file mode 100644
index 000000000..fea804193
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own data property on an Array-like object",
+
+ test: function testcase() {
+ var obj = { 1: null, 2: undefined, length: 2 };
+
+ return Array.prototype.lastIndexOf.call(obj, null) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, undefined) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js
new file mode 100644
index 000000000..3fc9d662f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = 1;
+ child[2] = 2;
+
+ return Array.prototype.lastIndexOf.call(child, 1) === 1 &&
+ Array.prototype.lastIndexOf.call(child, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js
new file mode 100644
index 000000000..3c8534c98
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own accessor property without a get function on an Array-like object",
+
+ test: function testcase() {
+
+ var obj = { 0: 1 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.lastIndexOf.call(obj, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js
new file mode 100644
index 000000000..49d09bbab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 20;
+ },
+ configurable: true
+ });
+
+ var obj = { 1: 1 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.lastIndexOf.call(obj, 1) === -1;
+ } finally {
+ delete Object.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js
new file mode 100644
index 000000000..acddb12be
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is inherited accessor property without a get function on an Array-like object",
+
+ test: function testcase() {
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = true;
+
+ return Array.prototype.lastIndexOf.call(child, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js
new file mode 100644
index 000000000..e6be2acf1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is undefined property on an Array-like object",
+
+ test: function testcase() {
+
+ var obj = { 0: null, 1: undefined };
+
+ return Array.prototype.lastIndexOf.call(obj, null) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-16.js
new file mode 100644
index 000000000..e3af5951b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-16.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-16.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is property of the document host object",
+
+ test: function testcase() {
+ var targetObj = {};
+ try {
+ var oldLen = document.length;
+ document.length = 2;
+
+ document[1] = targetObj;
+ if (Array.prototype.lastIndexOf.call(document, targetObj) !== 1) {
+ return false;
+ }
+
+ document[1] = {};
+ document[2] = targetObj;
+
+ return Array.prototype.lastIndexOf.call(document, targetObj) === -1;
+ } finally {
+ delete document[1];
+ delete document[2];
+ document.length = oldLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js
new file mode 100644
index 000000000..6942783f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js",
+
+ description: "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method",
+
+ test: function testcase() {
+
+ var targetObj = function () { };
+ var func = function (a, b) {
+ arguments[2] = function () { };
+ return Array.prototype.lastIndexOf.call(arguments, targetObj) === 1 &&
+ Array.prototype.lastIndexOf.call(arguments, arguments[2]) === -1;
+ };
+
+ return func(0, targetObj);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js
new file mode 100644
index 000000000..0aaee133a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js",
+
+ description: "Array.prototype.lastIndexOf applied to String object which implements its own property get method",
+
+ test: function testcase() {
+
+ var str = new String("012");
+ try {
+ String.prototype[3] = "3";
+ return Array.prototype.lastIndexOf.call(str, "2") === 2 &&
+ Array.prototype.lastIndexOf.call(str, "3") === -1;
+ } finally {
+ delete String.prototype[3];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js
new file mode 100644
index 000000000..b159d785e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js",
+
+ description: "Array.prototype.lastIndexOf applied to String object which implements its own property get method",
+
+ test: function testcase() {
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[1] = "b";
+ obj[2] = "c";
+
+ return Array.prototype.lastIndexOf.call(obj, obj[1]) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, obj[2]) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js
new file mode 100644
index 000000000..c4fabcbbe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own data property on an Array",
+
+ test: function testcase() {
+ var targetObj = {};
+ try {
+ Array.prototype[2] = targetObj;
+
+ return [0, targetObj].lastIndexOf(targetObj) === 1 &&
+ [0, 1].lastIndexOf(targetObj) === -1;
+ } finally {
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-20.js
new file mode 100644
index 000000000..7a2d84dc6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-20.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-2-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-20.js",
+
+ description: "Array.prototype.lastIndexOf applied to String object which implements its own property get method",
+
+ test: function testcase() {
+
+ var obj = new Function("a, b", "return a + b"); //value of obj length property will be 2;
+ obj[1] = "b";
+ obj[2] = "c";
+
+ return Array.prototype.lastIndexOf.call(obj, obj[1]) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, obj[2]) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js
new file mode 100644
index 000000000..2409d5b78
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var proto = {length: 0};
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[1] = child;
+
+ return Array.prototype.lastIndexOf.call(child, child) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js
new file mode 100644
index 000000000..5a68a1d20
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js",
+
+ description: "Array.prototype.lastIndexOf when 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var targetObj = {};
+ var arrProtoLen;
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+ return [0, targetObj, 2].lastIndexOf(targetObj) === 1;
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js
new file mode 100644
index 000000000..b6f600fdb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 0;
+ },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+ child[1] = null;
+
+ return Array.prototype.lastIndexOf.call(child, null) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js
new file mode 100644
index 000000000..de309337f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var proto = { length: 2 };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = "x";
+ child[2] = "y";
+
+ return Array.prototype.lastIndexOf.call(child, "x") === 1 &&
+ Array.prototype.lastIndexOf.call(child, "y") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js
new file mode 100644
index 000000000..9fdf11271
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own accessor property on an Array-like object",
+
+ test: function testcase() {
+
+ var obj = { 1: true, 2: false };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js
new file mode 100644
index 000000000..7016bac46
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var proto = { length: 0 };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = eval;
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.lastIndexOf.call(child, eval) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js
new file mode 100644
index 000000000..b0c8be5b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 0;
+ },
+ configurable: true
+ });
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = true;
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.lastIndexOf.call(child, true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js
new file mode 100644
index 000000000..64443c584
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var obj = { 0: 1, 1: 1, length: undefined };
+
+ return Array.prototype.lastIndexOf.call(obj, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js
new file mode 100644
index 000000000..5e23f7c97
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var obj = { 0: 0, length: NaN };
+
+ return Array.prototype.lastIndexOf.call(obj, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js
new file mode 100644
index 000000000..7b065b55f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string containing positive number",
+
+ test: function testcase() {
+
+ var obj = {1: true, 2: false, length: "2"};
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js
new file mode 100644
index 000000000..60b51280d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string containing negative number",
+
+ test: function testcase() {
+
+ var obj = {1: null, 2: undefined, length: "-4294967294"};
+
+ return Array.prototype.lastIndexOf.call(obj, null) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, undefined) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js
new file mode 100644
index 000000000..6f38e63b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+
+ var obj = { 4: 4, 5: 5, length: "5.512345" };
+
+ return Array.prototype.lastIndexOf.call(obj, 4) === 4 &&
+ Array.prototype.lastIndexOf.call(obj, 5) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js
new file mode 100644
index 000000000..813ac8ca5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var objOne = { 0: true, 1: true, length: "Infinity" };
+ var objTwo = { 0: true, 1: true, length: "+Infinity" };
+ var objThree = { 0: true, 1: true, length: "-Infinity" };
+
+ return Array.prototype.lastIndexOf.call(objOne, true) === -1 &&
+ Array.prototype.lastIndexOf.call(objTwo, true) === -1 &&
+ Array.prototype.lastIndexOf.call(objThree, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js
new file mode 100644
index 000000000..0827ee2cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+
+ var obj = {229: 229, 230: 2.3E2, length: "2.3E2"};
+
+ return Array.prototype.lastIndexOf.call(obj, 229) === 229 &&
+ Array.prototype.lastIndexOf.call(obj, 2.3E2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js
new file mode 100644
index 000000000..e516ba1b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string which is able to be converted into hex number",
+
+ test: function testcase() {
+
+ var obj = { 2573: 2573, 2574: 0x000A0E, length: "0x000A0E" };
+
+ return Array.prototype.lastIndexOf.call(obj, 2573) === 2573 &&
+ Array.prototype.lastIndexOf.call(obj, 0x000A0E) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js
new file mode 100644
index 000000000..13f7dcb07
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+
+ var obj = { 1: 1, 2: 2, length: "0002.0" };
+
+ return Array.prototype.lastIndexOf.call(obj, 1) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js
new file mode 100644
index 000000000..9014679eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+ var targetObj = new String("123abc123");
+ var obj = { 0: targetObj, length: "123abc123" };
+
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js
new file mode 100644
index 000000000..54ae6b628
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is an Object which has an own toString method",
+
+ test: function testcase() {
+
+ // objects inherit the default valueOf() method from Object
+ // that simply returns itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ var targetObj = window;
+ var obj = {
+ 1: targetObj,
+ 2: 2,
+
+ length: {
+ toString: function () {
+ return '2';
+ }
+ }
+ };
+
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js
new file mode 100644
index 000000000..554cf97c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js",
+
+ description: "Array.prototype.lastIndexOf return -1 when value of 'length' is a boolean (value is true)",
+
+ test: function testcase() {
+ var obj = { 0: 0, 1: 1, length: true };
+ return Array.prototype.lastIndexOf.call(obj, 0) === 0 &&
+ Array.prototype.lastIndexOf.call(obj, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js
new file mode 100644
index 000000000..49b3c1477
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is an Object which has an own valueOf method",
+
+ test: function testcase() {
+
+ //valueOf method will be invoked first, since hint is Number
+ var obj = {
+ 1: true,
+ 2: 2,
+
+ length: {
+ valueOf: function () {
+ return 2;
+ }
+ }
+ };
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, 2) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js
new file mode 100644
index 000000000..dbef906e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var targetObj = this;
+ var obj = {
+ 1: targetObj,
+ length: {
+ toString: function () {
+ toStringAccessed = true;
+ return '3';
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && toStringAccessed && valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js
new file mode 100644
index 000000000..681c16b2e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js",
+
+ description: "Array.prototype.lastIndexOf throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var obj = {
+ 1: true,
+ length: {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.lastIndexOf.call(obj, true);
+ return false;
+ } catch (e) {
+ return toStringAccessed && valueOfAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js
new file mode 100644
index 000000000..f9dc0f25a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js",
+
+ description: "Array.prototype.lastIndexOf uses inherited valueOf method when 'length' is an object with an own toString and an inherited valueOf methods",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.toString = function () {
+ toStringAccessed = true;
+ return 2;
+ };
+
+ var obj = {
+ 1: child,
+ length: child
+ };
+
+ return Array.prototype.lastIndexOf.call(obj, child) === 1 && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js
new file mode 100644
index 000000000..8244a562e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var obj = { 122: true, 123: false, length: 123.5 };
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 122 &&
+ Array.prototype.lastIndexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js
new file mode 100644
index 000000000..e7b98ff57
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var obj = { 1: true, 2: false, length: -4294967294.5 };
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, false) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js
new file mode 100644
index 000000000..00b16eb9b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ var targetObj = {};
+ var obj = {
+ 0: targetObj,
+ 4294967294: targetObj,
+ 4294967295: targetObj,
+ length: 4294967296
+ };
+
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; //verify length is 0 finally
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js
new file mode 100644
index 000000000..df5a0f5a8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+
+ var targetObj = {};
+ var obj = {
+ 0: targetObj,
+ 1: 4294967297,
+ length: 4294967297
+ };
+
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === 0 &&
+ Array.prototype.lastIndexOf.call(obj, 4294967297) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js
new file mode 100644
index 000000000..00f50b3c5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var obj = { 0: "undefined", length: 0 };
+
+ return Array.prototype.lastIndexOf.call(obj, "undefined") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js
new file mode 100644
index 000000000..d8756ee60
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var obj = { 0: true, length: -0 };
+
+ return Array.prototype.lastIndexOf.call(obj, true) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js
new file mode 100644
index 000000000..3d8f99854
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var obj = { 0: +0, length: +0 };
+
+ return Array.prototype.lastIndexOf.call(obj, +0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js
new file mode 100644
index 000000000..59e83fcdc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is a positive number)",
+
+ test: function testcase() {
+
+ var obj = { 99: true, 100: 100, length: 100 };
+
+ return Array.prototype.lastIndexOf.call(obj, true) === 99 &&
+ Array.prototype.lastIndexOf.call(obj, 100) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js
new file mode 100644
index 000000000..39006a8ed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is a negative number)",
+
+ test: function testcase() {
+
+ var obj = { 4: -Infinity, 5: Infinity, length: 5 - Math.pow(2, 32) };
+
+ return Array.prototype.lastIndexOf.call(obj, -Infinity) === 4 &&
+ Array.prototype.lastIndexOf.call(obj, Infinity) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js
new file mode 100644
index 000000000..251fd34dc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var obj = { 0: 0, length: Infinity };
+
+ return Array.prototype.lastIndexOf.call(obj, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js
new file mode 100644
index 000000000..3af32c956
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var obj = { 0: 0, length: -Infinity };
+
+ return Array.prototype.lastIndexOf.call(obj, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js
new file mode 100644
index 000000000..4129c6e56
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (empty array)",
+
+test: function testcase() {
+ var i = [].lastIndexOf(42);
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js
new file mode 100644
index 000000000..6a005c6ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is a number of value -6e-1",
+
+ test: function testcase() {
+ var targetObj = [];
+ var obj = { 0: targetObj, 100: targetObj, length: -6e-1 };
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js
new file mode 100644
index 000000000..6ef6ccc01
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is an empty string",
+
+ test: function testcase() {
+ var targetObj = [];
+ var obj = { 0: targetObj, 100: targetObj, length: "" };
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js
new file mode 100644
index 000000000..56810e97c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion))",
+
+test: function testcase() {
+
+ var i = Array.prototype.lastIndexOf.call({length: null}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js
new file mode 100644
index 000000000..752c5162c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length overridden to false (type conversion))",
+
+test: function testcase() {
+
+ var i = Array.prototype.lastIndexOf.call({length: false}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js
new file mode 100644
index 000000000..ba2738d92
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (generic 'array' with length 0 )",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ var i = Array.prototype.lastIndexOf.call({length: 0}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js
new file mode 100644
index 000000000..de3576f28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion))",
+
+test: function testcase() {
+
+ var i = Array.prototype.lastIndexOf.call({length: '0'}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js
new file mode 100644
index 000000000..77862525d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+
+ var i = Array.prototype.lastIndexOf.call({length: { valueOf: function () { return 0;}}}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js
new file mode 100644
index 000000000..54a4fea96
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ var i = Array.prototype.lastIndexOf.call({length: { toString: function () { return '0';}}}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js
new file mode 100644
index 000000000..59c2b2390
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-4-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js",
+
+description: "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length is an empty array)",
+
+test: function testcase() {
+
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+ var i = Array.prototype.lastIndexOf.call({length: [ ]}, 1);
+
+ if (i === -1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js
new file mode 100644
index 000000000..2652ae829
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js",
+
+ description: "Array.prototype.lastIndexOf - 'length' is a number of value 0.1",
+
+ test: function testcase() {
+ var targetObj = [];
+ var obj = { 0: targetObj, 100: targetObj, length: 0.1 };
+ return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js
new file mode 100644
index 000000000..17a3c062c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-5-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js",
+
+description: "Array.prototype.lastIndexOf when fromIndex is string",
+
+test: function testcase() {
+ var a = new Array(0,1,1);
+ if (a.lastIndexOf(1,"1") === 1 && // "1" resolves to 1
+ a.lastIndexOf(1,"one") === -1) { // NaN string resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js
new file mode 100644
index 000000000..a996155cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is positive number)",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 &&
+ [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js
new file mode 100644
index 000000000..90688bca3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is negative number)",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 &&
+ [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js
new file mode 100644
index 000000000..ad2b99ab8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is Infinity)",
+
+ test: function testcase() {
+ var arr = [];
+ arr[Math.pow(2, 32) - 2] = null; // length is the max value of Uint type
+ return arr.lastIndexOf(null, Infinity) === (Math.pow(2, 32) - 2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js
new file mode 100644
index 000000000..624ffe32c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ return [true].lastIndexOf(true, -Infinity) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js
new file mode 100644
index 000000000..fc39daff3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ return [0, true].lastIndexOf(true, NaN) === -1 && // from Index will be convert to +0
+ [true, 0].lastIndexOf(true, NaN) === 0 &&
+ [0, true].lastIndexOf(true, -NaN) === -1 &&
+ [true, 0].lastIndexOf(true, -NaN) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js
new file mode 100644
index 000000000..acc405544
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a negative number",
+
+ test: function testcase() {
+
+ return [0, "-2", 2].lastIndexOf("-2", "-2") === 1 &&
+ [0, 2, "-2"].lastIndexOf("-2", "-2") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js
new file mode 100644
index 000000000..6d9053b41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing Infinity",
+
+ test: function testcase() {
+ var arr = [];
+ arr[Math.pow(2, 32) - 2] = true; // length is the max value of Uint type
+ return arr.lastIndexOf(true, "Infinity") === (Math.pow(2, 32) - 2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js
new file mode 100644
index 000000000..d2d14329f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing -Infinity",
+
+ test: function testcase() {
+
+ return [true].lastIndexOf(true, "-Infinity") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js
new file mode 100644
index 000000000..d401cfded
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing an exponential number",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0") === 2 &&
+ [0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js
new file mode 100644
index 000000000..693d50304
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a hex number",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002") === 2 &&
+ [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js
new file mode 100644
index 000000000..34a81513b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js",
+
+description: "Array.prototype.lastIndexOf when fromIndex is floating point number",
+
+test: function testcase() {
+ var a = new Array(1,2,1);
+ if (a.lastIndexOf(2,1.49) === 1 && // 1.49 resolves to 1
+ a.lastIndexOf(2,0.51) === -1 && // 0.51 resolves to 0
+ a.lastIndexOf(1,0.51) === 0){ // 0.51 resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js
new file mode 100644
index 000000000..e0173ca48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' which is a string containing a number with leading zeros",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10") === 2 &&
+ [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10") === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js
new file mode 100644
index 000000000..98f03dcff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' which is an Object, and has an own toString method",
+
+ test: function testcase() {
+
+ // objects inherit the default valueOf() method from Object
+ // that simply returns itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ var fromIndex = {
+ toString: function () {
+ return '2';
+ }
+ };
+ var targetObj = new RegExp();
+
+ return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 &&
+ [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js
new file mode 100644
index 000000000..a15a357a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' which is an object, and has an own valueOf method",
+
+ test: function testcase() {
+
+ var fromIndex = {
+ valueOf: function () {
+ return 2;
+ }
+ };
+
+ var targetObj = function () {};
+ return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 &&
+ [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js
new file mode 100644
index 000000000..4fcf52b0b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var fromIndex = {
+ toString: function () {
+ toStringAccessed = true;
+ return '1';
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ };
+
+ return [0, true].lastIndexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js
new file mode 100644
index 000000000..0e1978d92
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js",
+
+ description: "Array.prototype.lastIndexOf throws TypeError exception when value of 'fromIndex' is an object that both toString and valueOf methods than don't return primitive value",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var fromIndex = {
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ },
+
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ }
+ };
+
+ try {
+ [0, null].lastIndexOf(null, fromIndex);
+ return false;
+ } catch (e) {
+ return toStringAccessed && valueOfAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js
new file mode 100644
index 000000000..4f3e1a9d4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js",
+
+ description: "Array.prototype.lastIndexOf use inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 1;
+ }
+ };
+
+ var Con = function () {};
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.toString = function () {
+ toStringAccessed = true;
+ return 1;
+ };
+
+ return [0, true].lastIndexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js
new file mode 100644
index 000000000..38d92a8d4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js",
+
+ description: "Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepTwoOccurs = false;
+ var stepFiveOccurs = false;
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ stepTwoOccurs = true;
+ if (stepFiveOccurs) {
+ throw new Error("Step 5 occurred out of order");
+ }
+ return 20;
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);
+ return stepTwoOccurs && stepFiveOccurs;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js
new file mode 100644
index 000000000..e904792d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js",
+
+ description: "Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepThreeOccurs = false;
+ var stepFiveOccurs = false;
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ valueOf: function () {
+ stepThreeOccurs = true;
+ if (stepFiveOccurs) {
+ throw new Error("Step 5 occurred out of order");
+ }
+ return 20;
+ }
+ };
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);
+ return stepThreeOccurs && stepFiveOccurs;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js
new file mode 100644
index 000000000..afc3bb512
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js",
+
+ description: "Array.prototype.lastIndexOf - side effects produced by step 1 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepFiveOccurs = false;
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.lastIndexOf.call(undefined, undefined, fromIndex);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError) && !stepFiveOccurs;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js
new file mode 100644
index 000000000..3dc58007f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js",
+
+ description: "Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepFiveOccurs = false;
+
+ var obj = {};
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new RangeError();
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);
+ return false;
+ } catch (e) {
+ return (e instanceof RangeError) && !stepFiveOccurs;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js
new file mode 100644
index 000000000..d58e204be
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js",
+
+description: "Array.prototype.lastIndexOf when fromIndex is boolean",
+
+test: function testcase() {
+ var a = new Array(1,2,1);
+ if (a.lastIndexOf(2,true) === 1 && // true resolves to 1
+ a.lastIndexOf(2,false) === -1 ) { // false resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js
new file mode 100644
index 000000000..a9d4d64f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-30",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js",
+
+ description: "Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var stepFiveOccurs = false;
+
+ var obj = {};
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ valueOf: function () {
+ throw new TypeError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ var fromIndex = {
+ valueOf: function () {
+ stepFiveOccurs = true;
+ return 0;
+ }
+ };
+
+ try {
+ Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError) && !stepFiveOccurs;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js
new file mode 100644
index 000000000..0e5a54433
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-31",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js",
+
+ description: "Array.prototype.lastIndexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 &&
+ [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js
new file mode 100644
index 000000000..6215888f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-32",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js",
+
+ description: "Array.prototype.lastIndexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction",
+
+ test: function testcase() {
+ var targetObj = {};
+ return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 &&
+ [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js
new file mode 100644
index 000000000..37a0bdc87
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-33",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js",
+
+ description: "Array.prototype.lastIndexOf - match on the first element, a middle element and the last element when 'fromIndex' is passed",
+
+ test: function testcase() {
+
+ return [0, 1, 2, 3, 4].lastIndexOf(0, 0) === 0 &&
+ [0, 1, 2, 3, 4].lastIndexOf(0, 2) === 0 &&
+ [0, 1, 2, 3, 4].lastIndexOf(2, 2) === 2 &&
+ [0, 1, 2, 3, 4].lastIndexOf(2, 4) === 2 &&
+ [0, 1, 2, 3, 4].lastIndexOf(4, 4) === 4;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js
new file mode 100644
index 000000000..2afb1d6ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js",
+
+description: "Array.prototype.lastIndexOf when fromIndex is undefined",
+
+test: function testcase() {
+ var a = new Array(1,2,1);
+ if (a.lastIndexOf(2,undefined) === -1 &&
+ a.lastIndexOf(1,undefined) === 0 &&
+ a.lastIndexOf(1) === 2) { // undefined resolves to 0, no second argument resolves to len
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js
new file mode 100644
index 000000000..0755c4859
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js",
+
+description: "Array.prototype.lastIndexOf when fromIndex is null",
+
+test: function testcase() {
+ var a = new Array(1,2,1);
+ if (a.lastIndexOf(2,null) === -1 && a.lastIndexOf(1,null) === 0) { // null resolves to 0
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js
new file mode 100644
index 000000000..58b3d71a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js",
+
+ description: "Array.prototype.lastIndexOf when 'fromIndex' isn't passed",
+
+ test: function testcase() {
+ var arr = [0, 1, 2, 3, 4];
+ //'fromIndex' will be set as 4 if not passed by default
+ return arr.lastIndexOf(0) === arr.lastIndexOf(0, 4) &&
+ arr.lastIndexOf(2) === arr.lastIndexOf(2, 4) &&
+ arr.lastIndexOf(4) === arr.lastIndexOf(4, 4);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js
new file mode 100644
index 000000000..4ea6f7556
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is 0)",
+
+ test: function testcase() {
+
+ return [0, 100].lastIndexOf(100, 0) === -1 && // verify fromIndex is not more than 0
+ [200, 0].lastIndexOf(200, 0) === 0; // verify fromIndex is not less than 0
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js
new file mode 100644
index 000000000..c2948de9d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-5-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is +0)",
+
+ test: function testcase() {
+
+ return [0, true].lastIndexOf(true, +0) === -1 &&
+ [true, 0].lastIndexOf(true, +0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js
new file mode 100644
index 000000000..1281b1de9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js",
+
+ description: "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -0)",
+
+ test: function testcase() {
+
+ return [0, true].lastIndexOf(true, -0) === -1 &&
+ [true, 0].lastIndexOf(true, -0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js
new file mode 100644
index 000000000..69f4a0d91
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-6-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js",
+
+description: "Array.prototype.lastIndexOf when fromIndex greater than Array.length",
+
+test: function testcase() {
+ var a = new Array(1,2,3);
+ if (a.lastIndexOf(3,5.4) === 2 &&
+ a.lastIndexOf(3,3.1) === 2 ) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js
new file mode 100644
index 000000000..3b1d33cf5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-6-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js",
+
+ description: "Array.prototype.lastIndexOf returns correct index when 'fromIndex' is length of array - 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].lastIndexOf(3, 2) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js
new file mode 100644
index 000000000..4613e0c9d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-6-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js",
+
+ description: "Array.prototype.lastIndexOf returns -1 when 'fromIndex' is length of array - 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].lastIndexOf(3, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js
new file mode 100644
index 000000000..62d8b6ff5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-6-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js",
+
+ description: "Array.prototype.lastIndexOf returns -1 when 'fromIndex' and 'length' are both 0",
+
+ test: function testcase() {
+
+ return [].lastIndexOf(1, 0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js
new file mode 100644
index 000000000..f2abf0508
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-6-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js",
+
+ description: "Array.prototype.lastIndexOf returns -1 when 'fromIndex' is 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].lastIndexOf(3, 1) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js
new file mode 100644
index 000000000..3aa587195
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-6-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js",
+
+ description: "Array.prototype.lastIndexOf returns correct index when 'fromIndex' is 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3].lastIndexOf(2, 1) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js
new file mode 100644
index 000000000..874814d8b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-7-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js",
+
+description: "Array.prototype.lastIndexOf with negative fromIndex ",
+
+test: function testcase() {
+ var a = new Array(1,2,3);
+
+ if (a.lastIndexOf(2,-2) === 1 &&
+ a.lastIndexOf(2,-3) === -1 &&
+ a.lastIndexOf(1,-5.3) === -1 ) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js
new file mode 100644
index 000000000..91163c64e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-7-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js",
+
+ description: "Array.prototype.lastIndexOf returns correct index when 'fromIndex' is -1",
+
+ test: function testcase() {
+
+ return [1, 2, 3, 4].lastIndexOf(4, -1) === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js
new file mode 100644
index 000000000..817f69a18
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-7-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js",
+
+ description: "Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array - 1",
+
+ test: function testcase() {
+
+ return [1, 2, 3, 4].lastIndexOf(3, -3) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js
new file mode 100644
index 000000000..d080133fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-7-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js",
+
+ description: "Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array",
+
+ test: function testcase() {
+
+ return [1, 2, 3, 4].lastIndexOf(2, -4) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+})
+
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js
new file mode 100644
index 000000000..afa6f5541
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js",
+
+description: "Array.prototype.lastIndexOf must return correct index(boolean)",
+
+test: function testcase() {
+ var obj = {toString:function (){return true}};
+ var _false = false;
+ var a = new Array(false,true,false,obj,_false,true,"true", undefined,0,null,1,"str",0,1);
+ if (a.lastIndexOf(true) === 5 && //a[5]=true
+ a.lastIndexOf(false) === 4) //a[4] =_false
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js
new file mode 100644
index 000000000..610eab4b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/** note that prior to the finally ES5 draft SameValue was used for comparisions
+and hence NaNs could be found using lastIndexOf **/
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-10",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js",
+
+description: "Array.prototype.lastIndexOf must return correct index (NaN)",
+
+test: function testcase() {
+ var _NaN = NaN;
+ var a = new Array("NaN",_NaN,NaN, undefined,0,false,null,{toString:function (){return NaN}},"false");
+ if (a.lastIndexOf(NaN) === -1) // NaN matches nothing, not even itself
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js
new file mode 100644
index 000000000..11965fb84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js",
+
+description: "Array.prototype.lastIndexOf must return correct index(Number)",
+
+test: function testcase() {
+ var obj = {toString:function (){return 0}};
+ var one = 1;
+ var _float = -(4/3);
+ var a = new Array(+0,true,0,-0, false,undefined,null,"0",obj, _float,-(4/3),-1.3333333333333,"str",one, 1, false);
+ if (a.lastIndexOf(-(4/3)) === 10 && // a[10]=-(4/3)
+ a.lastIndexOf(0) === 3 && // a[3] = -0, but using === -0 and 0 are equal
+ a.lastIndexOf(-0) ===3 && // a[3] = -0
+ a.lastIndexOf(1) === 14 ) // a[14] = 1
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js
new file mode 100644
index 000000000..b061f4d57
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js",
+
+description: "Array.prototype.lastIndexOf must return correct index(string)",
+
+test: function testcase() {
+ var obj = {toString:function (){return "false"}};
+ var szFalse = "false";
+ var a = new Array(szFalse, "false","false1",undefined,0,false,null,1,obj,0);
+ if (a.lastIndexOf("false") === 1)
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js
new file mode 100644
index 000000000..922644a6f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js",
+
+description: "Array.prototype.lastIndexOf must return correct index(undefined)",
+
+test: function testcase() {
+ var obj = {toString:function (){return undefined;}};
+ var _undefined1 = undefined;
+ var _undefined2;
+ var a = new Array(_undefined1,_undefined2,undefined,true,0,false,null,1,"undefined",obj,1);
+ if (a.lastIndexOf(undefined) === 2)
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js
new file mode 100644
index 000000000..540285876
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js",
+
+description: "Array.prototype.lastIndexOf must return correct index(Object)",
+
+test: function testcase() {
+ var obj1 = {toString:function (){return "false"}};
+ var obj2 = {toString:function (){return "false"}};
+ var obj3 = obj1;
+ var a = new Array(obj2,obj1,obj3,false,undefined,0,false,null,{toString:function (){return "false"}},"false");
+ if (a.lastIndexOf(obj3) === 2)
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js
new file mode 100644
index 000000000..af2b26ba2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js",
+
+description: "Array.prototype.lastIndexOf must return correct index(null)",
+
+test: function testcase() {
+ var obj = {toString:function (){return null}};
+ var _null = null;
+ var a = new Array(true,undefined,0,false,null,1,"str",0,1,null,true,false,undefined,_null,"null",undefined,"str",obj);
+ if (a.lastIndexOf(null) === 13 )
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js
new file mode 100644
index 000000000..40b38e595
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js",
+
+description: "Array.prototype.lastIndexOf must return correct index (self reference)",
+
+test: function testcase() {
+ var a = new Array(0,1,2,3);
+ a[2] = a;
+ if (a.lastIndexOf(a) === 2 &&
+ a.lastIndexOf(3) === 3 )
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js
new file mode 100644
index 000000000..71ca39340
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js",
+
+description: "Array.prototype.lastIndexOf must return correct index (Array)",
+
+test: function testcase() {
+ var b = new Array("0,1");
+ var a = new Array(0,b,"0,1",3);
+ if (a.lastIndexOf(b.toString()) === 2 &&
+ a.lastIndexOf("0,1") === 2 )
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js
new file mode 100644
index 000000000..71cbe96ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-8-9",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js",
+
+description: "Array.prototype.lastIndexOf must return correct index (Sparse Array)",
+
+test: function testcase() {
+ var a = new Array(0,1);
+ a[4294967294] = 2; // 2^32-2 - is max array element index
+ a[4294967295] = 3; // 2^32-1 added as non-array element property
+ a[4294967296] = 4; // 2^32 added as non-array element property
+ a[4294967297] = 5; // 2^32+1 added as non-array element property
+ // stop searching near the end in case implementation actually tries to test all missing elements!!
+ a[4294967200] = 3;
+ a[4294967201] = 4;
+ a[4294967202] = 5;
+
+
+ return (a.lastIndexOf(2) === 4294967294 &&
+ a.lastIndexOf(3) === 4294967200 &&
+ a.lastIndexOf(4) === 4294967201 &&
+ a.lastIndexOf(5) === 4294967202) ;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js
new file mode 100644
index 000000000..01afb958c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-a-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js",
+
+ description: "Array.prototype.lastIndexOf - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var arr = { };
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ arr[2] = "length";
+ return 3;
+ },
+ configurable: true
+ });
+
+ return 2 === Array.prototype.lastIndexOf.call(arr, "length");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js
new file mode 100644
index 000000000..347c62089
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-a-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js",
+
+ description: "Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array-like object",
+
+ test: function testcase() {
+
+ var arr = { length: 30 };
+ var targetObj = function () { };
+
+ var fromIndex = {
+ valueOf: function () {
+ arr[4] = targetObj;
+ return 10;
+ }
+ };
+
+ return 4 === Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js
new file mode 100644
index 000000000..155888471
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-a-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js",
+
+ description: "Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array",
+
+ test: function testcase() {
+
+ var arr = [];
+ arr.length = 30;
+ var targetObj = function () { };
+
+ var fromIndex = {
+ valueOf: function () {
+ arr[4] = targetObj;
+ return 11;
+ }
+ };
+
+ return 4 === arr.lastIndexOf(targetObj, fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js
new file mode 100644
index 000000000..e14a5347d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-a-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js",
+
+ description: "Array.prototype.lastIndexOf - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var arr = { 2: 6.99 };
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ delete arr[2];
+ return 3;
+ },
+ configurable: true
+ });
+
+ return -1 === Array.prototype.lastIndexOf.call(arr, 6.99);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js
new file mode 100644
index 000000000..03da35dda
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-a-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js",
+
+ description: "Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array-like object",
+
+ test: function testcase() {
+
+ var arr = { 10: false, length: 30 };
+
+ var fromIndex = {
+ valueOf: function () {
+ delete arr[10];
+ return 15;
+ }
+ };
+
+ return -1 === Array.prototype.lastIndexOf.call(arr, false, fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js
new file mode 100644
index 000000000..820f7244d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-a-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js",
+
+ description: "Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array",
+
+ test: function testcase() {
+
+ var arr = [];
+ arr[10] = "10";
+ arr.length = 20;
+
+ var fromIndex = {
+ valueOf: function () {
+ delete arr[10];
+ return 11;
+ }
+ };
+
+ return -1 === arr.lastIndexOf("10", fromIndex);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js
new file mode 100644
index 000000000..6ac675af6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js",
+
+ description: "Array.prototype.lastIndexOf - undefined property wouldn't be called",
+
+ test: function testcase() {
+
+ return [0, , 2].lastIndexOf(undefined) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js
new file mode 100644
index 000000000..8ae845480
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js",
+
+ description: "Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var obj = { 0: 0, 1: 1, 2: 2, length: 3 };
+
+ return Array.prototype.lastIndexOf.call(obj, 0) === 0 &&
+ Array.prototype.lastIndexOf.call(obj, 1) === 1 &&
+ Array.prototype.lastIndexOf.call(obj, 2) === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js
new file mode 100644
index 000000000..e47fb75d0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-b-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js",
+
+ description: "Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+ return [true, true, true].lastIndexOf(true) === 2 &&
+ [true, true, false].lastIndexOf(true) === 1 &&
+ [true, false, false].lastIndexOf(true) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-24.js
new file mode 100644
index 000000000..1ff2a9fde
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-24.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-i-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-24.js",
+
+ description: "Array.prototype.lastIndexOf - This object is the document host object",
+
+ test: function testcase() {
+
+ var targetObj = {};
+ try {
+ var oldLen = document.length;
+ document[0] = targetObj;
+ document[100] = "100";
+ document[200] = "200";
+ document.length = 200;
+ return 0 === Array.prototype.lastIndexOf.call(document, targetObj) &&
+ 100 === Array.prototype.lastIndexOf.call(document, "100") &&
+ -1 === Array.prototype.lastIndexOf.call(document, "200");
+ } finally {
+ delete document[0];
+ delete document[100];
+ delete document[200];
+ document.length = oldLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js
new file mode 100644
index 000000000..e86e0b43b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-b-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js",
+
+ description: "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var func = function (a, b) {
+ return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) &&
+ -1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]);
+ };
+
+ return func(true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js
new file mode 100644
index 000000000..e17439e00
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-b-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js",
+
+ description: "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters)",
+
+ test: function testcase() {
+
+ var func = function (a, b) {
+ return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) &&
+ 1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]) &&
+ -1 === Array.prototype.lastIndexOf.call(arguments, arguments[2]);
+ };
+
+ return func(0, true);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js
new file mode 100644
index 000000000..10dade626
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-b-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js",
+
+ description: "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var func = function (a, b) {
+ return 2 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) &&
+ 3 === Array.prototype.lastIndexOf.call(arguments, arguments[3]) &&
+ -1 === Array.prototype.lastIndexOf.call(arguments, arguments[4]);
+ };
+
+ return func(0, arguments, 0, Object.prototype);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js
new file mode 100644
index 000000000..629e62486
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js",
+
+ description: "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+ try {
+ Array.prototype[0] = Object;
+ return [Object.prototype].lastIndexOf(Object.prototype) === 0;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js
new file mode 100644
index 000000000..1275b149b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-b-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js",
+
+ description: "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ try {
+ Object.prototype[0] = false;
+ return 0 === Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true);
+ } finally {
+ delete Object.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js
new file mode 100644
index 000000000..6d203deef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js",
+
+ description: "Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ try {
+ Array.prototype[0] = true;
+ Array.prototype[1] = false;
+ Array.prototype[2] = "true";
+ return 0 === [, , , ].lastIndexOf(true) &&
+ 1 === [, , , ].lastIndexOf(false) &&
+ 2 === [, , , ].lastIndexOf("true");
+ } finally {
+ delete Array.prototype[0];
+ delete Array.prototype[1];
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js
new file mode 100644
index 000000000..c11adf6cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.15-8-b-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js",
+
+ description: "Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ try {
+ Object.prototype[0] = true;
+ Object.prototype[1] = false;
+ Object.prototype[2] = "true";
+ return 0 === Array.prototype.lastIndexOf.call({ length: 3 }, true) &&
+ 1 === Array.prototype.lastIndexOf.call({ length: 3 }, false) &&
+ 2 === Array.prototype.lastIndexOf.call({ length: 3 }, "true");
+ } finally {
+ delete Object.prototype[0];
+ delete Object.prototype[1];
+ delete Object.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js
new file mode 100644
index 000000000..95d501002
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js",
+
+ description: "Array.prototype.lastIndexOf - type of array element is different from type of search element",
+
+ test: function testcase() {
+
+ return ["true"].lastIndexOf(true) === -1 &&
+ ["0"].lastIndexOf(0) === -1 &&
+ [false].lastIndexOf(0) === -1 &&
+ [undefined].lastIndexOf(0) === -1 &&
+ [null].lastIndexOf(0) === -1 &&
+ [[]].lastIndexOf(0) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js
new file mode 100644
index 000000000..ee218781b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js",
+
+ description: "Array.prototype.lastIndexOf - both array element and search element are booleans, and they have same value",
+ test: function testcase() {
+
+ return [false, true].lastIndexOf(true) === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js
new file mode 100644
index 000000000..1b43a8dbb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js",
+
+ description: "Array.prototype.lastIndexOf - both array element and search element are Objects, and they refer to the same object",
+ test: function testcase() {
+
+ var obj1 = {};
+ var obj2 = {};
+ var obj3 = obj2;
+ return [obj2, obj1].lastIndexOf(obj3) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js
new file mode 100644
index 000000000..0aba7ea0b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js",
+
+ description: "Array.prototype.lastIndexOf - both type of array element and type of search element are Undefined",
+
+ test: function testcase() {
+
+ return [undefined].lastIndexOf() === 0 && [undefined].lastIndexOf(undefined) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js
new file mode 100644
index 000000000..44550d2f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js",
+
+ description: "Array.prototype.lastIndexOf - both type of array element and type of search element are Null",
+
+ test: function testcase() {
+
+ return [null].lastIndexOf(null) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js
new file mode 100644
index 000000000..68798bd79
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js",
+
+ description: "Array.prototype.lastIndexOf - search element is NaN",
+ test: function testcase() {
+
+ return [+NaN, NaN, -NaN].lastIndexOf(NaN) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js
new file mode 100644
index 000000000..ccf3acb2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js
@@ -0,0 +1,37 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js",
+
+ description: "Array.prototype.lastIndexOf - search element is -NaN",
+ test: function testcase() {
+ return [+NaN, NaN, -NaN].lastIndexOf(-NaN) === -1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js
new file mode 100644
index 000000000..455877de6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js",
+
+ description: "Array.prototype.lastIndexOf - array element is +0 and search element is -0",
+ test: function testcase() {
+
+ return [+0].lastIndexOf(-0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js
new file mode 100644
index 000000000..66d2273eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js",
+
+ description: "Array.prototype.lastIndexOf - array element is -0 and search element is +0",
+ test: function testcase() {
+
+ return [-0].lastIndexOf(+0) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js
new file mode 100644
index 000000000..0d4ec0f96
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js",
+
+ description: "Array.prototype.lastIndexOf - both array element and search element are numbers, and they have same value",
+ test: function testcase() {
+
+ return [-1, 0, 1].lastIndexOf(-1) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js
new file mode 100644
index 000000000..e44c8a160
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js",
+
+ description: "Array.prototype.lastIndexOf - both array element and search element are strings, and they have exactly the same sequence of characters",
+ test: function testcase() {
+
+ return ["abc", "ab", "bca", ""].lastIndexOf("abc") === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js
new file mode 100644
index 000000000..73d541d61
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.15-8-b-iii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js",
+
+ description: "Array.prototype.lastIndexOf returns index of last one when more than two elements in array are eligible",
+
+ test: function testcase() {
+
+ return [2, 1, 2, 2, 1].lastIndexOf(2) === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js
new file mode 100644
index 000000000..57f122fc3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.15-9-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js",
+
+description: "Array.prototype.lastIndexOf returns -1 for elements not present",
+
+test: function testcase() {
+ var a = new Array();
+ a[100] = 1;
+ a[99999] = "";
+ a[10] = new Object();
+ a[5555] = 5.5;
+ a[123456] = "str";
+ a[5] = 1E+309;
+ if (a.lastIndexOf(1) !== 100 ||
+ a.lastIndexOf("") !== 99999 ||
+ a.lastIndexOf("str") !== 123456 ||
+ a.lastIndexOf(5.5) !== 5555 ||
+ a.lastIndexOf(1E+309) !== 5 )
+ {
+ return false;
+ }
+ if (a.lastIndexOf(true) === -1 &&
+ a.lastIndexOf(5) === -1 &&
+ a.lastIndexOf("str1") === -1 &&
+ a.lastIndexOf(null) === -1 &&
+ a.lastIndexOf(new Object()) === -1 )
+ {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.lastIndexOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js
new file mode 100644
index 000000000..2101a8c84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js",
+
+description: "Array.prototype.every must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.every;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js
new file mode 100644
index 000000000..e2910c1a8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js",
+
+description: "Array.prototype.every.length must be 1",
+
+test: function testcase() {
+ if (Array.prototype.every.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js
new file mode 100644
index 000000000..b8fb6c4ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js",
+
+ description: "Array.prototype.every applied to undefined throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.every.call(undefined); // TypeError is thrown if value is undefined
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js
new file mode 100644
index 000000000..576ae3d60
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js",
+
+ description: "Array.prototype.every applied to the Math object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return ('[object Math]' !== Object.prototype.toString.call(obj));
+ }
+
+ try {
+ Math.length = 1;
+ Math[0] = 1;
+ return !Array.prototype.every.call(Math, callbackfn);
+ } finally {
+ delete Math[0];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js
new file mode 100644
index 000000000..c3597b00b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js",
+
+ description: "Array.prototype.every applied to Date object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return !(obj instanceof Date);
+ }
+
+ var obj = new Date();
+ obj.length = 1;
+ obj[0] = 1;
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js
new file mode 100644
index 000000000..aa64664e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js",
+
+ description: "Array.prototype.every applied to RegExp object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return !(obj instanceof RegExp);
+ }
+
+ var obj = new RegExp();
+ obj.length = 1;
+ obj[0] = 1;
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js
new file mode 100644
index 000000000..2d0759930
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js",
+
+ description: "Array.prototype.every applied to the JSON object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return ('[object JSON]' !== Object.prototype.toString.call(obj));
+ }
+
+ try {
+ JSON.length = 1;
+ JSON[0] = 1;
+ return !Array.prototype.every.call(JSON, callbackfn);
+ } finally {
+ delete JSON.length;
+ delete JSON[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js
new file mode 100644
index 000000000..05951a1a4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js",
+
+ description: "Array.prototype.every applied to Error object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return !(obj instanceof Error);
+ }
+
+ var obj = new Error();
+ obj.length = 1;
+ obj[0] = 1;
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js
new file mode 100644
index 000000000..05a39edb9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js",
+
+ description: "Array.prototype.every applied to the Arguments object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return ('[object Arguments]' !== Object.prototype.toString.call(obj));
+ }
+
+ var obj = (function fun() {
+ return arguments;
+ }("a", "b"));
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js
new file mode 100644
index 000000000..9a66d6dd7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js",
+
+ description: "Array.prototype.every applied to null throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.every.call(null); // TypeError is thrown if value is null
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js
new file mode 100644
index 000000000..1aa9ed6d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js",
+
+ description: "Array.prototype.every applied to boolean primitive",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return obj instanceof Boolean;
+ }
+
+ try {
+ Boolean.prototype[0] = 1;
+ Boolean.prototype.length = 1;
+ return Array.prototype.every.call(false, callbackfn) && accessed;
+ } finally {
+ delete Boolean.prototype[0];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js
new file mode 100644
index 000000000..d44b322b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js",
+
+ description: "Array.prototype.every applied to Boolean object",
+
+ test: function testcase() {
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return obj instanceof Boolean;
+ }
+
+ var obj = new Boolean(true);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+ return Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js
new file mode 100644
index 000000000..5de5d63bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js",
+
+ description: "Array.prototype.every applied to number primitive",
+
+ test: function testcase() {
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return obj instanceof Number;
+ }
+
+ try {
+ Number.prototype[0] = 1;
+ Number.prototype.length = 1;
+ return Array.prototype.every.call(2.5, callbackfn) && accessed;
+ } finally {
+ delete Number.prototype[0];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js
new file mode 100644
index 000000000..ebe1fe1f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js",
+
+ description: "Array.prototype.every applied to Number object",
+
+ test: function testcase() {
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return obj instanceof Number;
+ }
+
+ var obj = new Number(-128);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+ return Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js
new file mode 100644
index 000000000..30c318f15
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js",
+
+ description: "Array.prototype.every applied to string primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return !(obj instanceof String);
+ }
+
+ return !Array.prototype.every.call("hello\nworld\\!", callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js
new file mode 100644
index 000000000..1db6d1861
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js",
+
+ description: "Array.prototype.every applied to String object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return !(obj instanceof String);
+ }
+
+ var obj = new String("hello\nworld\\!");
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js
new file mode 100644
index 000000000..41c43f66a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js",
+
+ description: "Array.prototype.every applied to Function object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return !(obj instanceof Function);
+ }
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[0] = 11;
+ obj[1] = 9;
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js
new file mode 100644
index 000000000..f5a2a4684
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an own data property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: 2
+ };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js
new file mode 100644
index 000000000..d6d5df6eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an inherited accessor property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { };
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.every.call(child, callbackfn1) &&
+ !Array.prototype.every.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js
new file mode 100644
index 000000000..761227402
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an own accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 9,
+ 1: 8
+ };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js
new file mode 100644
index 000000000..c340d7eb3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js",
+
+ description: "Array.prototype.every - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+
+ test: function testcase() {
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var obj = { 0: 9, 1: 8 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ } finally {
+ delete Object.prototype.length;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js
new file mode 100644
index 000000000..b29167f34
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js",
+
+ description: "Array.prototype.every applied to the Array-like object that 'length' is inherited accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 9;
+ child[1] = 8;
+
+ return Array.prototype.every.call(child, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js
new file mode 100644
index 000000000..f92b6acbb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js",
+
+ description: "Array.prototype.every applied to the Array-like object that 'length' property doesn't exist",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js
new file mode 100644
index 000000000..891222900
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js",
+
+ description: "Array.prototype.every applied to the Arguments object, which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var func = function (a, b) {
+ arguments[2] = 9;
+ return Array.prototype.every.call(arguments, callbackfn1) &&
+ !Array.prototype.every.call(arguments, callbackfn2);
+ };
+
+ return func(12, 11);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js
new file mode 100644
index 000000000..2c178201f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js",
+
+ description: "Array.prototype.every applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return parseInt(val, 10) > 1;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return parseInt(val, 10) > 2;
+ }
+
+ var str = new String("432");
+ try {
+ String.prototype[3] = "1";
+ return Array.prototype.every.call(str, callbackfn1) &&
+ !Array.prototype.every.call(str, callbackfn2);
+ } finally {
+ delete String.prototype[3];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js
new file mode 100644
index 000000000..902cce59f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js",
+
+ description: "Array.prototype.every applied to Function object, which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var fun = function (a, b) {
+ return a + b;
+ };
+ fun[0] = 12;
+ fun[1] = 11;
+ fun[2] = 9;
+
+ return Array.prototype.every.call(fun, callbackfn1) &&
+ !Array.prototype.every.call(fun, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js
new file mode 100644
index 000000000..d2b9c5c37
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js",
+
+ description: "Array.prototype.every - 'length' is own data property on an Array",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ try {
+ Array.prototype[2] = 9;
+
+ return [12, 11].every(callbackfn1) &&
+ ![12, 11].every(callbackfn2);
+ } finally {
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js
new file mode 100644
index 000000000..5f9b465f8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.every.call(child, callbackfn1) &&
+ !Array.prototype.every.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js
new file mode 100644
index 000000000..29b06b3b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js",
+
+ description: "Array.prototype.every - 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+ var arrProtoLen = 0;
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+ Array.prototype[2] = 9;
+
+ return [12, 11].every(callbackfn1) &&
+ ![12, 11].every(callbackfn2);
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ delete Array.prototype[2];
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js
new file mode 100644
index 000000000..fa0579839
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { };
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+
+ return Array.prototype.every.call(child, callbackfn1) &&
+ !Array.prototype.every.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js
new file mode 100644
index 000000000..a72878d8e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an inherited data property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { length: 2 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.every.call(child, callbackfn1) &&
+ !Array.prototype.every.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js
new file mode 100644
index 000000000..16cea7b06
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an own accessor property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ obj[0] = 12;
+ obj[1] = 11;
+ obj[2] = 9;
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js
new file mode 100644
index 000000000..574d29b50
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.every.call(child, callbackfn1) &&
+ !Array.prototype.every.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js
new file mode 100644
index 000000000..566dd0897
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js",
+
+ description: "Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.every.call(child, callbackfn1) &&
+ !Array.prototype.every.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js
new file mode 100644
index 000000000..edfa51f76
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js",
+
+ description: "Array.prototype.every - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, length: undefined };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js
new file mode 100644
index 000000000..7d3fe65cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, length: NaN };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js
new file mode 100644
index 000000000..104f2eae6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js",
+
+ description: "Array.prototype.every - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "2" };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js
new file mode 100644
index 000000000..2ad032b9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js",
+
+ description: "Array.prototype.every - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js
new file mode 100644
index 000000000..993e7752c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js",
+
+ description: "Array.prototype.every - 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js
new file mode 100644
index 000000000..739bc07c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js",
+
+ description: "Array.prototype.every - 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var objOne = { 0: 9, length: "Infinity" };
+ var objTwo = { 0: 9, length: "+Infinity" };
+ var objThree = { 0: 9, length: "-Infinity" };
+
+ return Array.prototype.every.call(objOne, callbackfn) &&
+ Array.prototype.every.call(objTwo, callbackfn) &&
+ Array.prototype.every.call(objThree, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js
new file mode 100644
index 000000000..65610385b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js",
+
+ description: "Array.prototype.every - 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js
new file mode 100644
index 000000000..ad048c562
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js",
+
+ description: "Array.prototype.every - 'length' is a string containing a hex number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js
new file mode 100644
index 000000000..67488cbd5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js",
+
+ description: "Array.prototype.every - 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js
new file mode 100644
index 000000000..ff41a15bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js",
+
+ description: "Array.prototype.every - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, 1: 8, length: "two" };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js
new file mode 100644
index 000000000..74836edca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js",
+
+ description: "Array.prototype.every - value of 'length' is an Object which has an own toString method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var toStringAccessed = false;
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+
+ length: {
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ }
+ }
+ };
+
+ // objects inherit the default valueOf() method from Object
+ // that simply returns itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2) && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js
new file mode 100644
index 000000000..6a6a33634
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js",
+
+ description: "Array.prototype.every on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+
+ test: function testcase() {
+
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 11, 1: 9, length: true };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js
new file mode 100644
index 000000000..3d0823258
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js",
+
+ description: "Array.prototype.every - value of 'length' is an Object which has an own valueOf method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var valueOfAccessed = false;
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ }
+ };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2) && valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js
new file mode 100644
index 000000000..c9bb310b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js
@@ -0,0 +1,69 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js",
+
+ description: "Array.prototype.every - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ },
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ }
+ }
+ };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2) &&
+ valueOfAccessed &&
+ toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js
new file mode 100644
index 000000000..047c7bb8a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js",
+
+ description: "Array.prototype.every throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var callbackfnAccessed = false;
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ function callbackfn(val, idx, obj) {
+ callbackfnAccessed = true;
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12,
+
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ },
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.every.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js
new file mode 100644
index 000000000..ce35412e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js
@@ -0,0 +1,77 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js",
+
+ description: "Array.prototype.every uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ child.toString = function () {
+ toStringAccessed = true;
+ return '1';
+ };
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: child
+ };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2) &&
+ valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js
new file mode 100644
index 000000000..401d7ce18
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js",
+
+ description: "Array.prototype.every - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js
new file mode 100644
index 000000000..ccea8fd2d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js",
+
+ description: "Array.prototype.every - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: -4294967294.5
+ };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js
new file mode 100644
index 000000000..1b2f6d0e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js",
+
+ description: "Array.prototype.every - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 12,
+ length: 4294967296
+ };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js
new file mode 100644
index 000000000..df75fc959
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js",
+
+ description: "Array.prototype.every - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: 4294967297
+ };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js
new file mode 100644
index 000000000..d1a957587
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, length: 0 };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js
new file mode 100644
index 000000000..81dae595e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, length: +0 };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js
new file mode 100644
index 000000000..308dcec79
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, length: -0 };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js
new file mode 100644
index 000000000..d989fe529
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is positive)",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: 2 };
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js
new file mode 100644
index 000000000..7300d90a1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is negative)",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 2
+
+ return Array.prototype.every.call(obj, callbackfn1) &&
+ !Array.prototype.every.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js
new file mode 100644
index 000000000..db4972323
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, length: Infinity };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js
new file mode 100644
index 000000000..410cb2eff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js",
+
+ description: "Array.prototype.every - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 9, length: -Infinity };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js
new file mode 100644
index 000000000..916ac5b0e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js",
+
+description: "Array.prototype.every throws TypeError if callbackfn is undefined",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.every();
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js
new file mode 100644
index 000000000..a73b1475f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js",
+
+ description: "Array.prototype.every - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.every.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js
new file mode 100644
index 000000000..0ad9724e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js",
+
+ description: "Array.prototype.every - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.every.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js
new file mode 100644
index 000000000..a24ce9596
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-4-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js",
+
+ description: "Array.prototype.every - 'callbackfn' is a function",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ return ![11, 9].every(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js
new file mode 100644
index 000000000..7023072f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js",
+
+description: "Array.prototype.every throws TypeError if callbackfn is null",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.every(null);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js
new file mode 100644
index 000000000..a02dc64c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js",
+
+description: "Array.prototype.every throws TypeError if callbackfn is boolean",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.every(true);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js
new file mode 100644
index 000000000..2cfd63f3c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js",
+
+description: "Array.prototype.every throws TypeError if callbackfn is number",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.every(5);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js
new file mode 100644
index 000000000..745c70312
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js",
+
+description: "Array.prototype.every throws TypeError if callbackfn is string",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.every("abc");
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js
new file mode 100644
index 000000000..a81050135
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js",
+
+description: "Array.prototype.every throws TypeError if callbackfn is Object without a Call internal method",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.every( {} );
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js
new file mode 100644
index 000000000..5cc44ee39
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-4-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js",
+
+ description: "Array.prototype.every - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.every.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js
new file mode 100644
index 000000000..36744b218
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js",
+
+ description: "Array.prototype.every - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.every.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js
new file mode 100644
index 000000000..dfb1052ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-5-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js",
+
+description: "Array.prototype.every - thisArg not passed",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ return this === fnGlobalObject();
+ }
+
+ var arr = [1];
+ if(arr.every(callbackfn) === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js
new file mode 100644
index 000000000..3e677296d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js",
+
+ description: "Array.prototype.every - Array Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objArray = [];
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objArray;
+ }
+
+
+
+ return [11].every(callbackfn, objArray) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js
new file mode 100644
index 000000000..742f5edac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js",
+
+ description: "Array.prototype.every - String Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objString = new String();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objString;
+ }
+
+
+
+ return [11].every(callbackfn, objString) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js
new file mode 100644
index 000000000..e8fe0b777
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js",
+
+ description: "Array.prototype.every - Boolean Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objBoolean = new Boolean();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objBoolean;
+ }
+
+
+
+ return [11].every(callbackfn, objBoolean) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js
new file mode 100644
index 000000000..a13d31fd0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js",
+
+ description: "Array.prototype.every - Number Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objNumber = new Number();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objNumber;
+ }
+
+ return [11].every(callbackfn, objNumber) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js
new file mode 100644
index 000000000..fab818160
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js",
+
+ description: "Array.prototype.every - the Math object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === Math;
+ }
+
+ return [11].every(callbackfn, Math) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js
new file mode 100644
index 000000000..c51e3f56f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js",
+
+ description: "Array.prototype.every - Date Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objDate = new Date();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objDate;
+ }
+
+ return [11].every(callbackfn, objDate) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js
new file mode 100644
index 000000000..a9f660a0e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js",
+
+ description: "Array.prototype.every - RegExp Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objRegExp = new RegExp();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objRegExp;
+ }
+
+ return [11].every(callbackfn, objRegExp) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js
new file mode 100644
index 000000000..470e74016
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js",
+
+ description: "Array.prototype.every - the JSON object can be used as thisArg",
+
+ test: function testcase() {
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === JSON;
+ }
+
+ return [11].every(callbackfn, JSON) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js
new file mode 100644
index 000000000..80b7e4852
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js",
+
+ description: "Array.prototype.every - Error Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objError = new RangeError();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objError;
+ }
+
+ return [11].every(callbackfn, objError) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js
new file mode 100644
index 000000000..5eb9f09c7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js",
+
+ description: "Array.prototype.every - the Arguments object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var arg;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === arg;
+ }
+
+ (function fun() {
+ arg = arguments;
+ }(1, 2, 3));
+
+ return [11].every(callbackfn, arg) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js
new file mode 100644
index 000000000..3e65fd92d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js",
+
+description: "Array.prototype.every - thisArg is Object",
+
+test: function testcase() {
+ var res = false;
+ var o = new Object();
+ o.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var arr = [1];
+ if(arr.every(callbackfn, o) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js
new file mode 100644
index 000000000..64f13807c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js",
+
+ description: "Array.prototype.every - boolean primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this.valueOf() === false;
+ }
+
+ return [11].every(callbackfn, false) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js
new file mode 100644
index 000000000..ce2d0b1af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js",
+
+ description: "Array.prototype.every - number primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this.valueOf() === 101;
+ }
+
+ return [11].every(callbackfn, 101) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js
new file mode 100644
index 000000000..d20608cca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js",
+
+ description: "Array.prototype.every - string primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this.valueOf() === "abc";
+ }
+
+ return [11].every(callbackfn, "abc") && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js
new file mode 100644
index 000000000..092f64106
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js",
+
+description: "Array.prototype.every - thisArg is Array",
+
+test: function testcase() {
+ var res = false;
+ var a = new Array();
+ a.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var arr = [1];
+
+ if(arr.every(callbackfn, a) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js
new file mode 100644
index 000000000..bd2eca3f9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js",
+
+description: "Array.prototype.every - thisArg is object from object template(prototype)",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.prototype.res = true;
+ var f = new foo();
+ var arr = [1];
+
+ if(arr.every(callbackfn,f) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js
new file mode 100644
index 000000000..2acca4ffe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js",
+
+description: "Array.prototype.every - thisArg is object from object template",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ var f = new foo();
+ f.res = true;
+ var arr = [1];
+
+ if(arr.every(callbackfn,f) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js
new file mode 100644
index 000000000..182c61eb7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-5-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js",
+
+description: "Array.prototype.every - thisArg is function",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.res = true;
+ var arr = [1];
+
+ if(arr.every(callbackfn,foo) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js
new file mode 100644
index 000000000..6b0c53908
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js",
+
+ description: "Array.prototype.every - built-in functions can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === eval;
+ }
+
+ return [11].every(callbackfn, eval) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js
new file mode 100644
index 000000000..d2aa45652
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js",
+
+ description: "Array.prototype.every - Function Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objFunction = function () { };
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objFunction;
+ }
+
+ return [11].every(callbackfn, objFunction) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js
new file mode 100644
index 000000000..49e92b660
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js",
+
+description: "Array.prototype.every considers new elements added to array after the call",
+
+test: function testcase() {
+
+ var calledForThree = false;
+
+ function callbackfn(val, Idx, obj)
+ {
+ arr[2] = 3;
+ if(val == 3)
+ calledForThree = true;
+ return true;
+ }
+
+ var arr = [1,2,,4,5];
+
+ var res = arr.every(callbackfn);
+
+ return calledForThree;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js
new file mode 100644
index 000000000..5a2294970
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js",
+
+description: "Array.prototype.every considers new value of elements in array after the call",
+
+test: function testcase() {
+
+ function callbackfn(val, Idx, obj)
+ {
+ arr[4] = 6;
+ if(val < 6)
+ return true;
+ else
+ return false;
+ }
+
+ var arr = [1,2,3,4,5];
+
+ if(arr.every(callbackfn) === false)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js
new file mode 100644
index 000000000..041f8ace4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js",
+
+description: "Array.prototype.every doesn't visit deleted elements in array after the call",
+
+test: function testcase() {
+
+ function callbackfn(val, Idx, obj)
+ {
+ delete arr[2];
+ if(val == 3)
+ return false;
+ else
+ return true;
+ }
+
+ var arr = [1,2,3,4,5];
+
+ if(arr.every(callbackfn) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js
new file mode 100644
index 000000000..449c873e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js",
+
+description: "Array.prototype.every doesn't visit deleted elements when Array.length is decreased",
+
+test: function testcase() {
+
+ function callbackfn(val, Idx, obj)
+ {
+ arr.length = 3;
+ if(val < 4)
+ return true;
+ else
+ return false;
+ }
+
+ var arr = [1,2,3,4,6];
+
+ if(arr.every(callbackfn) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js
new file mode 100644
index 000000000..c474a28b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js",
+
+description: "Array.prototype.every doesn't consider newly added elements in sparse array",
+
+test: function testcase() {
+
+ function callbackfn(val, Idx, obj)
+ {
+ arr[1000] = 3;
+ if(val < 3)
+ return true;
+ else
+ return false;
+ }
+
+ var arr = new Array(10);
+ arr[1] = 1;
+ arr[2] = 2;
+
+ if(arr.every(callbackfn) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js
new file mode 100644
index 000000000..e4cbc4500
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js",
+
+description: "Array.prototype.every visits deleted element in array after the call when same index is also present in prototype",
+
+test: function testcase() {
+
+ function callbackfn(val, Idx, obj)
+ {
+ delete arr[2];
+ if(val == 3)
+ return false;
+ else
+ return true;
+ }
+
+ Array.prototype[2] = 3;
+ var arr = [1,2,3,4,5];
+
+ var res = arr.every(callbackfn);
+ delete Array.prototype[2];
+
+ if(res === false)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js
new file mode 100644
index 000000000..3af5b7901
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js",
+
+ description: "Array.prototype.every - no observable effects occur if len is 0",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, 1: 12, length: 0 };
+
+ return Array.prototype.every.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js
new file mode 100644
index 000000000..f4d6baf68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-b-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js",
+
+description: "Array.prototype.every - callbackfn not called for indexes never been assigned values",
+
+test: function testcase() {
+
+ var callCnt = 0.;
+ function callbackfn(val, Idx, obj)
+ {
+ callCnt++;
+ return true;
+ }
+
+ var arr = new Array(10);
+ arr[1] = undefined;
+ arr.every(callbackfn);
+ if( callCnt === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js
new file mode 100644
index 000000000..cff483bf6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-b-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js",
+
+ description: "Array.prototype.every - added properties in step 2 are visible here",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ if (idx === 2 && val === "length") {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ var arr = { };
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ arr[2] = "length";
+ return 3;
+ },
+ configurable: true
+ });
+
+ return !Array.prototype.every.call(arr, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js
new file mode 100644
index 000000000..81c09da6b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-b-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js",
+
+ description: "Array.prototype.every - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return idx !== 2;
+ }
+ var arr = { 2: 6.99, 8: 19};
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ delete arr[2];
+ return 10;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.every.call(arr, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js
new file mode 100644
index 000000000..3408c9488
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js",
+
+ description: "Array.prototype.every - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = { };
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val !== kValue;
+ } else {
+ return true;
+ }
+ }
+
+ var obj = { 5: kValue, length: 100 };
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js
new file mode 100644
index 000000000..13939b80b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js",
+
+ description: "Array.prototype.every - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val === 11;
+ }
+
+ return [11].every(callbackfn) && 1 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js
new file mode 100644
index 000000000..be2a2cff2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js",
+
+ description: "Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val === 11;
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.every.call(arguments, callbackfn);
+ };
+
+ return func(11) && called === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js
new file mode 100644
index 000000000..35b9be0d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js",
+
+ description: "Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (idx === 0) {
+ return val === 11;
+ } else if (idx === 1) {
+ return val === 9;
+ } else {
+ return false;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.every.call(arguments, callbackfn);
+ };
+
+ return func(11, 9) && called === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js
new file mode 100644
index 000000000..3366eb989
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js",
+
+ description: "Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (idx < 2) {
+ return val > 10;
+ } else if (idx === 2) {
+ return val < 10;
+ } else {
+ return false;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.every.call(arguments, callbackfn);
+ };
+
+ return func(11, 12, 9) && called === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js
new file mode 100644
index 000000000..7ecdaaf6f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js",
+
+ description: "Array.prototype.every - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val === 100;
+ } else {
+ return true;
+ }
+ }
+
+ var proto = { 0: 11, 5: 100 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[5] = "abc";
+ child.length = 10;
+
+ return !Array.prototype.every.call(child, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js
new file mode 100644
index 000000000..b10450127
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js",
+
+ description: "Array.prototype.every - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+ var called = 0;
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val === 12;
+ }
+
+ try {
+ Array.prototype[0] = 11;
+ Array.prototype[1] = 11;
+
+ return [12, 12].every(callbackfn) && called === 2;
+ } finally {
+ delete Array.prototype[0];
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js
new file mode 100644
index 000000000..948330efc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js",
+
+ description: "Array.prototype.every - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = 'abc';
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val !== kValue;
+ } else {
+ return true;
+ }
+ }
+
+ var proto = { 5: kValue };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 10;
+
+ return !Array.prototype.every.call(child, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js
new file mode 100644
index 000000000..96c4e4b45
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js",
+
+ description: "Array.prototype.every - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 1) {
+ return val !== 13;
+ } else {
+ return true;
+ }
+ }
+
+ try {
+ Array.prototype[1] = 13;
+ return ![, , , ].every(callbackfn);
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js
new file mode 100644
index 000000000..dbaa14488
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-c-ii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js",
+
+description: "Array.prototype.every - callbackfn called with correct parameters",
+
+test: function testcase() {
+
+ function callbackfn(val, Idx, obj)
+ {
+ if(obj[Idx] === val)
+ return true;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+
+ if(arr.every(callbackfn) === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js
new file mode 100644
index 000000000..753b61235
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js",
+
+ description: "Array.prototype.every - callbackfn is called with 1 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val) {
+ called++;
+ return val > 10;
+ }
+
+ return [11, 12].every(callbackfn) && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js
new file mode 100644
index 000000000..d16315d97
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js",
+
+ description: "Array.prototype.every - callbackfn is called with 2 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx) {
+ called++;
+ return val > 10 && arguments[2][idx] === val;
+ }
+
+ return [11, 12].every(callbackfn) && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js
new file mode 100644
index 000000000..d9889b016
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js",
+
+ description: "Array.prototype.every - callbackfn is called with 3 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val > 10 && obj[idx] === val;
+ }
+
+ return [11, 12, 13].every(callbackfn) && 3 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js
new file mode 100644
index 000000000..185f587f8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js",
+
+ description: "Array.prototype.every - callbackfn that uses arguments object to get parameter value",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn() {
+ called++;
+ return arguments[2][arguments[1]] === arguments[0];
+ }
+
+ return [11, 12].every(callbackfn) && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-14.js
new file mode 100644
index 000000000..60de8a998
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-14.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-14.js",
+
+ description: "Array.prototype.every - 'this' of 'callbackfn' is an object when 'T' is not an object('T' is undefined)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, o) {
+ accessed = true;
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.every.call(obj, callbackfn, undefined) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-15.js
new file mode 100644
index 000000000..fc8d7859f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-15.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-15.js",
+
+ description: "Array.prototype.every - 'this' of 'callbackfn' is an object when 'T' is not an object(T is null)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, o) {
+ accessed = true;
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var arr = [11];
+
+ return arr.every(callbackfn, null) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js
new file mode 100644
index 000000000..86ad0aa19
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js",
+
+ description: "Array.prototype.every - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean primitive)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this.valueOf() !== false;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return !Array.prototype.every.call(obj, callbackfn, false) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js
new file mode 100644
index 000000000..c5de2558d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js",
+
+ description: "Array.prototype.every -'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, o) {
+ accessed = true;
+ return 5 === this.valueOf();
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return Array.prototype.every.call(obj, callbackfn, 5) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js
new file mode 100644
index 000000000..bed0efb6d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js",
+
+ description: "Array.prototype.every - 'this' of 'callbackfn' is an String object when T is not an object (T is a string primitive)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 'hello' === this.valueOf();
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return Array.prototype.every.call(obj, callbackfn, "hello") && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js
new file mode 100644
index 000000000..345165ed0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js",
+
+ description: "Array.prototype.every - non-indexed properties are not called",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val !== 8;
+ }
+
+ var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };
+
+ return Array.prototype.every.call(obj, callbackfn) && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js
new file mode 100644
index 000000000..8da4147ed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-c-ii-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js",
+
+description: "Array.prototype.every - callbackfn takes 3 arguments",
+
+test: function testcase() {
+
+ function callbackfn(val, Idx, obj)
+ {
+ if(arguments.length === 3) //verify if callbackfn was called with 3 parameters
+ return true;
+ }
+
+ var arr = [0,1,true,null,new Object(),"five"];
+ arr[999999] = -6.6;
+
+ if(arr.every(callbackfn) === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js
new file mode 100644
index 000000000..27b365977
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js",
+
+ description: "Array.prototype.every - callbackfn called with correct parameters (thisArg is correct)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 10 === this.threshold;
+ }
+
+ var thisArg = { threshold: 10 };
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.every.call(obj, callbackfn, thisArg);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js
new file mode 100644
index 000000000..646e09db6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js",
+
+ description: "Array.prototype.every - callbackfn called with correct parameters (kValue is correct)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ if (idx === 0) {
+ return val === 11;
+ }
+
+ if (idx === 1) {
+ return val === 12;
+ }
+
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ return Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js
new file mode 100644
index 000000000..9a221130b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js",
+
+ description: "Array.prototype.every - callbackfn called with correct parameters (the index k is correct)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ if (val === 11) {
+ return idx === 0;
+ }
+
+ if (val === 12) {
+ return idx === 1;
+ }
+
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ return Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js
new file mode 100644
index 000000000..cf0caaecb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js",
+
+ description: "Array.prototype.every - callbackfn called with correct parameters (this object O is correct)",
+
+ test: function testcase() {
+
+ var called = 0;
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ called++;
+ return obj === o;
+ }
+
+ return Array.prototype.every.call(obj, callbackfn) && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js
new file mode 100644
index 000000000..baea080df
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-7-c-ii-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js",
+
+description: "Array.prototype.every immediately returns false if callbackfn returns false",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ if(idx > 5)
+ return false;
+ else
+ return true;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+
+ if(arr.every(callbackfn) === false && callCnt === 7)
+ return true;
+
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js
new file mode 100644
index 000000000..6450fcb78
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js",
+
+ description: "Array.prototype.every - k values are passed in ascending numeric order",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2, 3, 4, 5];
+ var lastIdx = 0;
+ var called = 0;
+ function callbackfn(val, idx, o) {
+ called++;
+ if (lastIdx !== idx) {
+ return false;
+ } else {
+ lastIdx++;
+ return true;
+ }
+ }
+
+ return arr.every(callbackfn) && arr.length === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js
new file mode 100644
index 000000000..82c85a621
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js",
+
+ description: "Array.prototype.every - k values are accessed during each iteration and not prior to starting the loop on an Array",
+
+ test: function testcase() {
+ var called = 0;
+ var kIndex = [];
+
+ //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(val, idx, obj) {
+ called++;
+ //Each position should be visited one time, which means k is accessed one time during iterations.
+ if (typeof kIndex[idx] === "undefined") {
+ //when current position is visited, its previous index should has been visited.
+ if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") {
+ return false;
+ }
+ kIndex[idx] = 1;
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ return [11, 12, 13, 14].every(callbackfn, undefined) && 4 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js
new file mode 100644
index 000000000..a8ffac80b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js",
+
+ description: "Array.prototype.every - arguments to callbackfn are self consistent",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var thisArg = {};
+ var obj = { 0: 11, length: 1 };
+
+ function callbackfn() {
+ accessed = true;
+ return this === thisArg &&
+ arguments[0] === 11 &&
+ arguments[1] === 0 &&
+ arguments[2] === obj;
+ }
+
+ return Array.prototype.every.call(obj, callbackfn, thisArg) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js
new file mode 100644
index 000000000..9bd5e9b6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js",
+
+ description: "Array.prototype.every - unhandled exceptions happened in callbackfn terminate iteration",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (called === 1) {
+ throw new Error("Exception occurred in callbackfn");
+ }
+ return true;
+ }
+
+ var obj = { 0: 11, 4: 10, 10: 8, length: 20 };
+
+ try {
+ Array.prototype.every.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return 1 === called;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js
new file mode 100644
index 000000000..a06e1e077
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js",
+
+ description: "Array.prototype.every - element changed by callbackfn on previous iterations is observed",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ if (idx === 0) {
+ obj[idx + 1] = 8;
+ }
+ return val > 10;
+ }
+
+
+
+ return !Array.prototype.every.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js
new file mode 100644
index 000000000..5e121edff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js",
+
+ description: "Array.prototype.every - callbackfn is called with 0 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn() {
+ called++;
+ return true;
+ }
+
+ return [11, 12].every(callbackfn) && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js
new file mode 100644
index 000000000..0311d35fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js",
+
+ description: "Array.prototype.every - return value of callbackfn is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var obj = { 0: 11, length: 1 };
+
+ function callbackfn(val, idx, o) {
+ accessed = true;
+ return undefined;
+ }
+
+
+
+ return !Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js
new file mode 100644
index 000000000..bc9f46691
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return Infinity;
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js
new file mode 100644
index 000000000..d4678b803
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return -Infinity;
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js
new file mode 100644
index 000000000..8da2d649c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return NaN;
+ }
+
+ return ![11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js
new file mode 100644
index 000000000..a87d1fa00
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js",
+
+ description: "Array.prototype.every - return value of callbackfn is an empty string",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return "";
+ }
+
+ return ![11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js
new file mode 100644
index 000000000..e45abfcaa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a non-empty string",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return "non-empty string";
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js
new file mode 100644
index 000000000..a7ec2bf35
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a Function object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return function () { };
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js
new file mode 100644
index 000000000..d20e5aef2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js",
+
+ description: "Array.prototype.every - return value of callbackfn is an Array object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return [];
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js
new file mode 100644
index 000000000..2cd087899
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a String object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return new String();
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js
new file mode 100644
index 000000000..0b9ba7b13
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a Boolean object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return new Boolean();
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js
new file mode 100644
index 000000000..ec258b07b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a Number object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return new Number();
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js
new file mode 100644
index 000000000..d4e81fb08
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js",
+
+ description: "Array.prototype.every - return value of callbackfn is null",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var obj = { 0: 11, length: 1 };
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return null;
+ }
+
+
+
+ return !Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js
new file mode 100644
index 000000000..9455283db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js",
+
+ description: "Array.prototype.every - return value of callbackfn is the Math object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return Math;
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js
new file mode 100644
index 000000000..af3cda71b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a Date object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return new Date();
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js
new file mode 100644
index 000000000..244453a1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a RegExp object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return new RegExp();
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js
new file mode 100644
index 000000000..be9fda290
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js",
+
+ description: "Array.prototype.every - return value of callbackfn is the JSON object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return JSON;
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js
new file mode 100644
index 000000000..0621ee437
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js",
+
+ description: "Array.prototype.every - return value of callbackfn is an Error object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return new EvalError();
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js
new file mode 100644
index 000000000..152d29528
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js",
+
+ description: "Array.prototype.every - return value of callbackfn is the Arguments object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return arguments;
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js
new file mode 100644
index 000000000..da5ac19ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js",
+
+ description: "Array.prototype.every - return value (new Boolean(false)) of callbackfn is treated as true value",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return new Boolean(false);
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js
new file mode 100644
index 000000000..b3a7c4441
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a boolean (value is false)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var obj = { 0: 11, length: 1 };
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return false;
+ }
+
+ return !Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js
new file mode 100644
index 000000000..a0f4a1b32
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a boolean (value is true)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var obj = { 0: 11, length: 1 };
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+
+
+ return Array.prototype.every.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js
new file mode 100644
index 000000000..e895ab454
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 0;
+ }
+
+ return ![11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js
new file mode 100644
index 000000000..abba851be
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return +0;
+ }
+
+ return ![11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js
new file mode 100644
index 000000000..31186608a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a nunmber (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return -0;
+ }
+
+ return ![11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js
new file mode 100644
index 000000000..70b366576
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a number (value is positive number)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 5;
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js
new file mode 100644
index 000000000..38a9a7cb7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.16-7-c-iii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js",
+
+ description: "Array.prototype.every - return value of callbackfn is a number (value is negative number)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return -5;
+ }
+
+ return [11].every(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js
new file mode 100644
index 000000000..cac3dff88
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (empty array)",
+
+test: function testcase() {
+ function cb() {}
+ var i = [].every(cb);
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js
new file mode 100644
index 000000000..371dfa595
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-10",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js",
+
+description: "Array.prototype.every - subclassed array when length is reduced",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 2;
+
+ function cb(val)
+ {
+ if(val>2)
+ return false;
+ else
+ return true;
+ }
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js
new file mode 100644
index 000000000..abb942291
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-11",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js",
+
+description: "Array.prototype.every returns true when all calls to callbackfn return true",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ return true;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+
+ if(arr.every(callbackfn) === true && callCnt === 10)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js
new file mode 100644
index 000000000..fe4b723f9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-12",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js",
+
+description: "Array.prototype.every doesn't mutate the array on which it is called on",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ return true;
+ }
+ var arr = [1,2,3,4,5];
+ arr.every(callbackfn);
+ if(arr[0] === 1 &&
+ arr[1] === 2 &&
+ arr[2] === 3 &&
+ arr[3] === 4 &&
+ arr[4] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js
new file mode 100644
index 000000000..7548f4339
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-13",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js",
+
+description: "Array.prototype.every doesn't visit expandos",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ return true;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+ arr["i"] = 10;
+ arr[true] = 11;
+
+ if(arr.every(callbackfn) === true && callCnt === 10)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js
new file mode 100644
index 000000000..9a0937d02
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ function cb(){}
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js
new file mode 100644
index 000000000..857a3f877
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ function cb(){}
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js
new file mode 100644
index 000000000..aa897d9f8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ function cb(){}
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js
new file mode 100644
index 000000000..f6769930d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ function cb(){}
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js
new file mode 100644
index 000000000..5282726f9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ function cb(){}
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js
new file mode 100644
index 000000000..5597464a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ function cb(){}
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js
new file mode 100644
index 000000000..4472c5c6c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.16-8-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js",
+
+description: "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with []",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ var i = f.every(cb);
+
+ if (i === true) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.every);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js
new file mode 100644
index 000000000..57d8b3df0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js",
+
+description: "Array.prototype.some must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.some;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js
new file mode 100644
index 000000000..2937afeb7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js",
+
+description: "Array.prototype.some.length must be 1",
+
+test: function testcase() {
+ if (Array.prototype.some.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js
new file mode 100644
index 000000000..b41f07b2d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js",
+
+ description: "Array.prototype.some applied to undefined throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.some.call(undefined);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js
new file mode 100644
index 000000000..7e1ffe977
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js",
+
+ description: "Array.prototype.some applied to the Math object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return '[object Math]' === Object.prototype.toString.call(obj);
+ }
+
+ try {
+ Math.length = 1;
+ Math[0] = 1;
+ return Array.prototype.some.call(Math, callbackfn);
+ } finally {
+ delete Math[0];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js
new file mode 100644
index 000000000..1296b3630
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js",
+
+ description: "Array.prototype.some applied to Date object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Date;
+ }
+
+ var obj = new Date();
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 9;
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js
new file mode 100644
index 000000000..83b3e4814
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js",
+
+ description: "Array.prototype.some applied to RegExp object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof RegExp;
+ }
+
+ var obj = new RegExp();
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 9;
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js
new file mode 100644
index 000000000..0572ab584
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js",
+
+ description: "Array.prototype.some applied to the JSON object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return '[object JSON]' === Object.prototype.toString.call(obj);
+ }
+
+ try {
+ JSON.length = 1;
+ JSON[0] = 1;
+ return Array.prototype.some.call(JSON, callbackfn);
+ } finally {
+ delete JSON.length;
+ delete JSON[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js
new file mode 100644
index 000000000..4a6da3b59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js",
+
+ description: "Array.prototype.some applied to Error object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Error;
+ }
+
+ var obj = new Error();
+ obj.length = 1;
+ obj[0] = 1;
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js
new file mode 100644
index 000000000..9a67f5dca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js",
+
+ description: "Array.prototype.some applied to the Arguments object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return '[object Arguments]' === Object.prototype.toString.call(obj);
+ }
+
+ var obj = (function () {
+ return arguments;
+ }("a", "b"));
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js
new file mode 100644
index 000000000..e6ff4eceb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js",
+
+ description: "Array.prototype.some applied to null throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.some.call(null);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js
new file mode 100644
index 000000000..470805430
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js",
+
+ description: "Array.prototype.some applied to boolean primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ try {
+ Boolean.prototype[0] = 1;
+ Boolean.prototype.length = 1;
+ return Array.prototype.some.call(false, callbackfn);
+ } finally {
+ delete Boolean.prototype[0];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js
new file mode 100644
index 000000000..6e84eba50
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js",
+
+ description: "Array.prototype.some applied to Boolean object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ var obj = new Boolean(true);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 9;
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js
new file mode 100644
index 000000000..83f23268f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js",
+
+ description: "Array.prototype.some applied to number primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ try {
+ Number.prototype[1] = true;
+ Number.prototype.length = 2;
+
+ return Array.prototype.some.call(5, callbackfn);
+ } finally {
+ delete Number.prototype[1];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js
new file mode 100644
index 000000000..da67400a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js",
+
+ description: "Array.prototype.some applied to Number object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ var obj = new Number(-128);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 9;
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js
new file mode 100644
index 000000000..98f35371a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js",
+
+ description: "Array.prototype.some applied to applied to string primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof String;
+ }
+
+ return Array.prototype.some.call("hello\nw_orld\\!", callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js
new file mode 100644
index 000000000..37808a20e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js",
+
+ description: "Array.prototype.some applied to String object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof String;
+ }
+
+ var obj = new String("hello\nw_orld\\!");
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js
new file mode 100644
index 000000000..dc1884a31
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js",
+
+ description: "Array.prototype.some applied to Function object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Function;
+ }
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[0] = 11;
+ obj[1] = 9;
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js
new file mode 100644
index 000000000..8dfe038ed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js",
+
+ description: "Array.prototype.some - 'length' is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = {
+ 0: 9,
+ 1: 11,
+ 2: 12,
+ length: 2
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js
new file mode 100644
index 000000000..d06e7ac76
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js",
+
+ description: "Array.prototype.some - 'length' is an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 9;
+ child[1] = 11;
+ child[2] = 12;
+
+ return Array.prototype.some.call(child, callbackfn1) &&
+ !Array.prototype.some.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js
new file mode 100644
index 000000000..6050f1fe1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js",
+
+ description: "Array.prototype.some - 'length' is an own accessor property without a get function on an Array-like object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12
+ };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js
new file mode 100644
index 000000000..ec5523d66
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js",
+
+ description: "Array.prototype.some - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var obj = { 0: 11, 1: 12 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ } finally {
+ delete Object.prototype.length;
+ }
+
+ },
+
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js
new file mode 100644
index 000000000..5f0ef80f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js",
+
+ description: "Array.prototype.some - 'length' is inherited accessor property without a get function on an Array-like object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 11;
+ child[1] = 12;
+
+ return !Array.prototype.some.call(child, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js
new file mode 100644
index 000000000..e6843545e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js",
+
+ description: "Array.prototype.some - 'length' property doesn't exist on an Array-like object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js
new file mode 100644
index 000000000..9ecfb0647
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js",
+
+ description: "Array.prototype.some applied to the Arguments object which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var func = function (a, b) {
+ arguments[2] = 12;
+ return Array.prototype.some.call(arguments, callbackfn1) &&
+ !Array.prototype.some.call(arguments, callbackfn2);
+ };
+
+ return func(9, 11);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js
new file mode 100644
index 000000000..89c02bcb5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js",
+
+ description: "Array.prototype.some applied to String object which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return parseInt(val, 10) > 1;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return parseInt(val, 10) > 2;
+ }
+
+ var str = new String("12");
+ try {
+ String.prototype[2] = "3";
+ return Array.prototype.some.call(str, callbackfn1) &&
+ !Array.prototype.some.call(str, callbackfn2);
+ } finally {
+ delete String.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js
new file mode 100644
index 000000000..c73adc9b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js",
+
+ description: "Array.prototype.some applied to Function object which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var fun = function (a, b) {
+ return a + b;
+ };
+ fun[0] = 9;
+ fun[1] = 11;
+ fun[2] = 12;
+
+ return Array.prototype.some.call(fun, callbackfn1) &&
+ !Array.prototype.some.call(fun, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js
new file mode 100644
index 000000000..eed692348
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js",
+
+ description: "Array.prototype.some - 'length' is own data property on an Array",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ try {
+ Array.prototype[2] = 12;
+
+ return [9, 11].some(callbackfn1) &&
+ ![9, 11].some(callbackfn2);
+ } finally {
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js
new file mode 100644
index 000000000..4a45dfa60
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js",
+
+ description: "Array.prototype.some - 'length' is an own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[0] = 9;
+ child[1] = 11;
+ child[2] = 12;
+
+ return Array.prototype.some.call(child, callbackfn1) &&
+ !Array.prototype.some.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js
new file mode 100644
index 000000000..54843e99c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js",
+
+ description: "Array.prototype.some - 'length' is an own data property that overrides an inherited data property on an array",
+
+ test: function testcase() {
+ var arrProtoLen = 0;
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+ Array.prototype[2] = 12;
+
+ return [9, 11].some(callbackfn1) &&
+ ![9, 11].some(callbackfn2);
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js
new file mode 100644
index 000000000..555f4351a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js",
+
+ description: "Array.prototype.some - 'length' is an own data property that overrides an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+
+ child[0] = 9;
+ child[1] = 11;
+ child[2] = 12;
+
+ return Array.prototype.some.call(child, callbackfn1) &&
+ !Array.prototype.some.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js
new file mode 100644
index 000000000..b5b6a7407
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js",
+
+ description: "Array.prototype.some - 'length' is an inherited data property on an Array-like object",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { length: 2 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 9;
+ child[1] = 11;
+ child[2] = 12;
+
+ return Array.prototype.some.call(child, callbackfn1) &&
+ !Array.prototype.some.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js
new file mode 100644
index 000000000..8f35fc818
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js",
+
+ description: "Array.prototype.some - 'length' is an own accessor property on an Array-like object",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ obj[0] = 9;
+ obj[1] = 11;
+ obj[2] = 12;
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js
new file mode 100644
index 000000000..3f95bf725
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js",
+
+ description: "Array.prototype.some - 'length' is an own accessor property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 9;
+ child[1] = 11;
+ child[2] = 12;
+
+ return Array.prototype.some.call(child, callbackfn1) &&
+ !Array.prototype.some.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js
new file mode 100644
index 000000000..744124b44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js",
+
+ description: "Array.prototype.some - 'length' is an own accessor property that overrides an inherited accessor property on an Array-like object",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 9;
+ child[1] = 11;
+ child[2] = 12;
+
+ return Array.prototype.some.call(child, callbackfn1) &&
+ !Array.prototype.some.call(child, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js
new file mode 100644
index 000000000..ee24e1f97
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js",
+
+ description: "Array.prototype.some - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: undefined };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js
new file mode 100644
index 000000000..0c635f795
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: NaN };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js
new file mode 100644
index 000000000..610157fbc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js",
+
+ description: "Array.prototype.some - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: "2" };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js
new file mode 100644
index 000000000..48bc181bd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js",
+
+ description: "Array.prototype.some - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: "-4294967294" };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js
new file mode 100644
index 000000000..feafd20d6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js",
+
+ description: "Array.prototype.some - 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: "2.5" };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js
new file mode 100644
index 000000000..a4bf40f5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js",
+
+ description: "Array.prototype.some - 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var objOne = { 0: 11, length: "Infinity" };
+ var objTwo = { 0: 11, length: "+Infinity" };
+ var objThree = { 0: 11, length: "-Infinity" };
+
+ return !Array.prototype.some.call(objOne, callbackfn) &&
+ !Array.prototype.some.call(objTwo, callbackfn) &&
+ !Array.prototype.some.call(objThree, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js
new file mode 100644
index 000000000..f683fee04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js",
+
+ description: "Array.prototype.some - 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: "2E0" };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js
new file mode 100644
index 000000000..1a408bd0d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js",
+
+ description: "Array.prototype.some - 'length' is a string containing a hex number",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: "0x0002" };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js
new file mode 100644
index 000000000..541ed0567
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js",
+
+ description: "Array.prototype.some - 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: "0002.00" };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js
new file mode 100644
index 000000000..b94b13654
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js",
+
+ description: "Array.prototype.some - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, 1: 21, length: "two" };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js
new file mode 100644
index 000000000..a559e8404
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js",
+
+ description: "Array.prototype.some - value of 'length' is an Object which has an own toString method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var toStringAccessed = false;
+ var obj = {
+ 0: 9,
+ 1: 11,
+ 2: 12,
+
+ length: {
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ }
+ }
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2) && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js
new file mode 100644
index 000000000..5d4701392
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js",
+
+ description: "Array.prototype.some on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 11, 1: 12, length: true };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js
new file mode 100644
index 000000000..f4d26c62f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js",
+
+ description: "Array.prototype.some - value of 'length' is an Object which has an own valueOf method",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var valueOfAccessed = false;
+
+ var obj = {
+ 0: 9,
+ 1: 11,
+ 2: 12,
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ }
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2) && valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js
new file mode 100644
index 000000000..1cbfdbda4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js
@@ -0,0 +1,68 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js",
+
+ description: "Array.prototype.some - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var obj = {
+ 0: 9,
+ 1: 11,
+ 2: 12,
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ },
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ }
+ }
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2) &&
+ valueOfAccessed && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js
new file mode 100644
index 000000000..0aef79354
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js",
+
+ description: "Array.prototype.some throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var callbackfnAccessed = false;
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ function callbackfn(val, idx, obj) {
+ callbackfnAccessed = true;
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12,
+
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ },
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.some.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js
new file mode 100644
index 000000000..b702fcb5b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js
@@ -0,0 +1,76 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js",
+
+ description: "Array.prototype.some uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ child.toString = function () {
+ toStringAccessed = true;
+ return '1';
+ };
+
+ var obj = {
+ 0: 9,
+ 1: 11,
+ 2: 12,
+ length: child
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2) &&
+ valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js
new file mode 100644
index 000000000..065dbe996
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js",
+
+ description: "Array.prototype.some - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = {
+ 0: 9,
+ 10: 11,
+ 11: 12,
+ length: 11.5
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js
new file mode 100644
index 000000000..62c8ed44c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js",
+
+ description: "Array.prototype.some - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = {
+ 0: 9,
+ 1: 11,
+ 2: 12,
+ length: -4294967294.5
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js
new file mode 100644
index 000000000..00d12d52f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js",
+
+ description: "Array.prototype.some - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 12,
+ length: 4294967296
+ };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js
new file mode 100644
index 000000000..317f5bfac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js",
+
+ description: "Array.prototype.some - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12,
+ length: 4294967297
+ };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js
new file mode 100644
index 000000000..4cfc0a5af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: 0 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js
new file mode 100644
index 000000000..b0f95eea4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: +0 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js
new file mode 100644
index 000000000..0f52c5fec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: -0 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js
new file mode 100644
index 000000000..71a7505ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is positive)",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: 2 };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js
new file mode 100644
index 000000000..53926a681
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is negative)",
+
+ test: function testcase() {
+ function callbackfn1(val, idx, obj) {
+ return val > 10;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ return val > 11;
+ }
+
+ var obj = { 0: 9, 1: 11, 2: 12, length: -4294967294 };
+
+ return Array.prototype.some.call(obj, callbackfn1) &&
+ !Array.prototype.some.call(obj, callbackfn2);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js
new file mode 100644
index 000000000..1d8871571
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: Infinity };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js
new file mode 100644
index 000000000..156c92550
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js",
+
+ description: "Array.prototype.some - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: -Infinity };
+
+ return !Array.prototype.some.call(obj, callbackfn) && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js
new file mode 100644
index 000000000..48e014d68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js",
+
+description: "Array.prototype.some throws TypeError if callbackfn is undefined",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.some();
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js
new file mode 100644
index 000000000..aabd43907
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js",
+
+ description: "Array.prototype.some - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.some.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js
new file mode 100644
index 000000000..7bc53d22a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js",
+
+ description: "Array.prototype.some - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.some.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js
new file mode 100644
index 000000000..13f942c68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-4-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js",
+
+ description: "Array.prototype.some - 'callbackfn' is a function",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ return [9, 11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js
new file mode 100644
index 000000000..3d99f2420
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js",
+
+description: "Array.prototype.some throws ReferenceError if callbackfn is unreferenced",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.some(foo);
+ }
+ catch(e) {
+ if(e instanceof ReferenceError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js
new file mode 100644
index 000000000..a0da988b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js",
+
+description: "Array.prototype.some throws TypeError if callbackfn is null",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.some(null);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js
new file mode 100644
index 000000000..c6cf05f68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js",
+
+description: "Array.prototype.some throws TypeError if callbackfn is boolean",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.some(true);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js
new file mode 100644
index 000000000..9f47a5879
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js",
+
+description: "Array.prototype.some throws TypeError if callbackfn is number",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.some(5);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js
new file mode 100644
index 000000000..a99982d2b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js",
+
+description: "Array.prototype.some throws TypeError if callbackfn is string",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.some("abc");
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js
new file mode 100644
index 000000000..fa1e56744
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js",
+
+description: "Array.prototype.some throws TypeError if callbackfn is Object without a Call internal method",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.some(new Object());
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js
new file mode 100644
index 000000000..d12af21f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-4-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js",
+
+ description: "Array.prototype.some - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.some.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js
new file mode 100644
index 000000000..5c400c2f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js",
+
+ description: "Array.prototype.some - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.some.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js
new file mode 100644
index 000000000..e378f6c1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.17-5-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js",
+
+ description: "Array.prototype.some - thisArg not passed",
+
+ test: function testcase() {
+ this._15_4_4_17_5_1 = true;
+ var _15_4_4_17_5_1 = false;
+
+ function callbackfn(val, idx, obj) {
+ return this._15_4_4_17_5_1;
+ }
+ var arr = [1];
+ return !arr.some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js
new file mode 100644
index 000000000..f3536b355
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js",
+
+ description: "Array.prototype.some - Array Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objArray = [];
+
+ function callbackfn(val, idx, obj) {
+ return this === objArray;
+ }
+
+ return [11].some(callbackfn, objArray);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js
new file mode 100644
index 000000000..733d6eb52
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js",
+
+ description: "Array.prototype.some - String object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objString = new String();
+
+ function callbackfn(val, idx, obj) {
+ return this === objString;
+ }
+
+ return [11].some(callbackfn, objString);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js
new file mode 100644
index 000000000..4206929ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js",
+
+ description: "Array.prototype.some - Boolean object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objBoolean = new Boolean();
+
+ function callbackfn(val, idx, obj) {
+ return this === objBoolean;
+ }
+
+ return [11].some(callbackfn, objBoolean);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js
new file mode 100644
index 000000000..54f72a4a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js",
+
+ description: "Array.prototype.some - Number object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objNumber = new Number();
+
+ function callbackfn(val, idx, obj) {
+ return this === objNumber;
+ }
+
+ return [11].some(callbackfn, objNumber);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js
new file mode 100644
index 000000000..670d1f922
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js",
+
+ description: "Array.prototype.some - the Math object can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this === Math;
+ }
+
+ return [11].some(callbackfn, Math);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js
new file mode 100644
index 000000000..67eff1696
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js",
+
+ description: "Array.prototype.some - Date object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objDate = new Date();
+
+ function callbackfn(val, idx, obj) {
+ return this === objDate;
+ }
+
+ return [11].some(callbackfn, objDate);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js
new file mode 100644
index 000000000..8ae4f6a1b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js",
+
+ description: "Array.prototype.some - RegExp object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objRegExp = new RegExp();
+
+ function callbackfn(val, idx, obj) {
+ return this === objRegExp;
+ }
+
+ return [11].some(callbackfn, objRegExp);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js
new file mode 100644
index 000000000..77531d7f1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js",
+
+ description: "Array.prototype.some - the JSON object can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this === JSON;
+ }
+
+ return [11].some(callbackfn, JSON);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js
new file mode 100644
index 000000000..958165fef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js",
+
+ description: "Array.prototype.some - Error object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objError = new RangeError();
+
+ function callbackfn(val, idx, obj) {
+ return this === objError;
+ }
+
+ return [11].some(callbackfn, objError);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js
new file mode 100644
index 000000000..62655f2da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js",
+
+ description: "Array.prototype.some - the Arguments object can be used as thisArg",
+
+ test: function testcase() {
+
+ var arg;
+
+ function callbackfn(val, idx, obj) {
+ return this === arg;
+ }
+
+ (function fun() {
+ arg = arguments;
+ }(1, 2, 3));
+
+ return [11].some(callbackfn, arg);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js
new file mode 100644
index 000000000..6f42343a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js",
+
+description: "Array.prototype.some - thisArg is Object",
+
+test: function testcase() {
+ var res = false;
+ var o = new Object();
+ o.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var arr = [1];
+ if(arr.some(callbackfn, o) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js
new file mode 100644
index 000000000..9ee4293b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js",
+
+ description: "Array.prototype.some - boolean primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === false;
+ }
+
+ return [11].some(callbackfn, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js
new file mode 100644
index 000000000..723362ce5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js",
+
+ description: "Array.prototype.some - number primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === 101;
+ }
+
+ return [11].some(callbackfn, 101);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js
new file mode 100644
index 000000000..09a7d76fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js",
+
+ description: "Array.prototype.some - string primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === "abc";
+ }
+
+ return [11].some(callbackfn, "abc");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js
new file mode 100644
index 000000000..ea7f6922f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js",
+
+description: "Array.prototype.some - thisArg is Array",
+
+test: function testcase() {
+ var res = false;
+ var a = new Array();
+ a.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var arr = [1];
+
+ if(arr.some(callbackfn, a) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js
new file mode 100644
index 000000000..52e8b2da5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js",
+
+description: "Array.prototype.some - thisArg is object from object template(prototype)",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.prototype.res = true;
+ var f = new foo();
+ var arr = [1];
+
+ if(arr.some(callbackfn,f) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js
new file mode 100644
index 000000000..fa48855ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js",
+
+description: "Array.prototype.some - thisArg is object from object template",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ var f = new foo();
+ f.res = true;
+ var arr = [1];
+
+ if(arr.some(callbackfn,f) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js
new file mode 100644
index 000000000..f8829a767
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-5-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js",
+
+description: "Array.prototype.some - thisArg is function",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.res = true;
+ var arr = [1];
+
+ if(arr.some(callbackfn,foo) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js
new file mode 100644
index 000000000..d26a44b6c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js",
+
+ description: "Array.prototype.some - built-in functions can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this === eval;
+ }
+
+ return [11].some(callbackfn, eval);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js
new file mode 100644
index 000000000..f581fd5b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js",
+
+ description: "Array.prototype.some - Function Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objFunction = function () { };
+
+ function callbackfn(val, idx, obj) {
+ return this === objFunction;
+ }
+
+ return [11].some(callbackfn, objFunction);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js
new file mode 100644
index 000000000..dd39c2b7f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js",
+
+description: "Array.prototype.some considers new elements added to array after it is called",
+
+test: function testcase() {
+ var calledForThree = false;
+
+ function callbackfn(val, idx, obj)
+ {
+ arr[2] = 3;
+ if(val !== 3)
+ calledForThree = true;
+
+ return false;
+ }
+
+ var arr = [1,2,,4,5];
+
+ var val = arr.some(callbackfn);
+ return calledForThree;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js
new file mode 100644
index 000000000..56b76108f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js",
+
+description: "Array.prototype.some considers new value of elements in array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ arr[4] = 6;
+ if(val < 6)
+ return false;
+ else
+ return true;
+ }
+
+ var arr = [1,2,3,4,5];
+
+ if(arr.some(callbackfn) === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js
new file mode 100644
index 000000000..0755015b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js",
+
+description: "Array.prototype.some doesn't visit deleted elements in array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ delete arr[2];
+ if(val !== 3)
+ return false;
+ else
+ return true;
+ }
+
+ var arr = [1,2,3,4,5];
+
+ if(arr.some(callbackfn) === false)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js
new file mode 100644
index 000000000..45abcc8b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js",
+
+description: "Array.prototype.some doesn't visit deleted elements when Array.length is decreased",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ arr.length = 3;
+ if(val < 4)
+ return false;
+ else
+ return true;
+ }
+
+ var arr = [1,2,3,4,6];
+
+ if(arr.some(callbackfn) === false)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js
new file mode 100644
index 000000000..1ea116ee2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js",
+
+description: "Array.prototype.some doesn't consider newly added elements in sparse array",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ arr[1000] = 5;
+ if(val < 5)
+ return false;
+ else
+ return true;
+ }
+
+ var arr = new Array(10);
+ arr[1] = 1;
+ arr[2] = 2;
+
+ if(arr.some(callbackfn) === false)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js
new file mode 100644
index 000000000..65a9571b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js",
+
+description: "Array.prototype.some visits deleted element in array after the call when same index is also present in prototype",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ delete arr[4];
+ if(val < 5)
+ return false;
+ else
+ return true;
+ }
+
+
+ Array.prototype[4] = 5;
+ var arr = [1,2,3,4,5];
+
+ var res = arr.some(callbackfn) ;
+ delete Array.prototype[4];
+ if(res === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js
new file mode 100644
index 000000000..fbb2c7545
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-b-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js",
+
+description: "Array.prototype.some - callbackfn not called for indexes never been assigned values",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ return false;
+ }
+
+ var arr = new Array(10);
+ arr[1] = undefined;
+ arr.some(callbackfn);
+ if(callCnt === 1)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js
new file mode 100644
index 000000000..1947309d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-b-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js",
+
+ description: "Array.prototype.some - added properties in step 2 are visible here",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ if (idx === 2 && val === "length") {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ var arr = { };
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ arr[2] = "length";
+ return 3;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.some.call(arr, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js
new file mode 100644
index 000000000..c5eccfeed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-b-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js",
+
+ description: "Array.prototype.some - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return idx === 2;
+ }
+ var arr = { 2: 6.99, 8: 19};
+
+ Object.defineProperty(arr, "length", {
+ get: function () {
+ delete arr[2];
+ return 10;
+ },
+ configurable: true
+ });
+
+ return !Array.prototype.some.call(arr, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js
new file mode 100644
index 000000000..bb29c4c3a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js",
+
+ description: "Array.prototype.some - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = {};
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ var obj = { 5: kValue, length: 100 };
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js
new file mode 100644
index 000000000..ba688fc53
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js",
+
+ description: "Array.prototype.some - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var kValue = {};
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return kValue === val;
+ }
+ return false;
+ }
+
+ return [kValue].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js
new file mode 100644
index 000000000..db31c7a0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js",
+
+ description: "Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 11;
+ }
+ return false;
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.some.call(arguments, callbackfn);
+ };
+
+ return func(11);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js
new file mode 100644
index 000000000..cb51b3ba2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js",
+
+ description: "Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ var firstResult = false;
+ var secondResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ firstResult = (val === 11);
+ return false;
+ } else if (idx === 1) {
+ secondResult = (val === 9);
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.some.call(arguments, callbackfn);
+ };
+
+ return !func(11, 9) && firstResult && secondResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js
new file mode 100644
index 000000000..d63806921
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js",
+
+ description: "Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var firstResult = false;
+ var secondResult = false;
+ var thirdResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ firstResult = (val === 11);
+ return false;
+ } else if (idx === 1) {
+ secondResult = (val === 12);
+ return false;
+ } else if (idx === 2) {
+ thirdResult = (val === 9);
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.some.call(arguments, callbackfn);
+ };
+
+ return !func(11, 12, 9) && firstResult && secondResult && thirdResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js
new file mode 100644
index 000000000..d72463568
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js",
+
+ description: "Array.prototype.some - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = "abc";
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ var proto = { 5: 100 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[5] = kValue;
+ child.length = 10;
+
+ return Array.prototype.some.call(child, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js
new file mode 100644
index 000000000..2be04269a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js",
+
+ description: "Array.prototype.some - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var kValue = "abc";
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ try {
+ Array.prototype[0] = 11;
+
+ return [kValue].some(callbackfn);
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js
new file mode 100644
index 000000000..40e8645d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js",
+
+ description: "Array.prototype.some - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = 'abc';
+
+ function callbackfn(val, idx, obj) {
+ if (5 === idx) {
+ return kValue === val;
+ }
+ return false;
+ }
+
+ var proto = { 5: kValue };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 10;
+
+ return Array.prototype.some.call(child, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js
new file mode 100644
index 000000000..3996bb39c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js",
+
+ description: "Array.prototype.some - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ var kValue = {};
+
+ function callbackfn(val, idx, obj) {
+ if (0 === idx) {
+ return kValue === val;
+ }
+ return false;
+ }
+
+ try {
+ Array.prototype[0] = kValue;
+
+ return [, ].some(callbackfn);
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js
new file mode 100644
index 000000000..65957a1b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-c-ii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js",
+
+description: "Array.prototype.some - callbackfn called with correct parameters",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ if(obj[idx] === val)
+ return false;
+ else
+ return true;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+
+ if(arr.some(callbackfn) === false)
+ return true;
+
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js
new file mode 100644
index 000000000..843aaede7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js",
+
+ description: "Array.prototype.some - callbackfn is called with 1 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn(val) {
+ return val > 10;
+ }
+
+ return [11, 12].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js
new file mode 100644
index 000000000..d82adc287
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js",
+
+ description: "Array.prototype.some - callbackfn is called with 2 formal parameter",
+
+ test: function testcase() {
+ function callbackfn(val, idx) {
+ return val > 10 && arguments[2][idx] === val;
+ }
+
+ return [9, 12].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js
new file mode 100644
index 000000000..ad76e8d91
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js",
+
+ description: "Array.prototype.some - callbackfn is called with 3 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10 && obj[idx] === val;
+ }
+
+ return [9, 12].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js
new file mode 100644
index 000000000..1e8d7cc84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js",
+
+ description: "Array.prototype.some - callbackfn that uses arguments object to get parameter value",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return arguments[2][arguments[1]] === arguments[0];
+ }
+
+ return [9, 12].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-14.js
new file mode 100644
index 000000000..393a0e6c5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-14.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-14.js",
+
+ description: "Array.prototype.some - 'this' of 'callbackfn' is an object when 'T' is not an object ('T' is undefined)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.some.call(obj, callbackfn, undefined);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-15.js
new file mode 100644
index 000000000..dbad22a91
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-15.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-15.js",
+
+ description: "Array.prototype.some - 'this' of 'callbackfn' is an object when 'T' is not an object ('T' is null)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.some.call(obj, callbackfn, null);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js
new file mode 100644
index 000000000..f002f413d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js",
+
+ description: "Array.prototype.some - 'this' of 'callback' is a Boolean object when 'T' is not an object ('T' is a boolean primitive)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === false;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.some.call(obj, callbackfn, false);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js
new file mode 100644
index 000000000..83c4a40a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js",
+
+ description: "Array.prototype.some - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === 5;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.some.call(obj, callbackfn, 5);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js
new file mode 100644
index 000000000..53e834e70
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js",
+
+ description: "Array.prototype.some - 'this' of 'callbackfn' is an String object when T is not an object (T is a string primitive)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === "hello!";
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+
+ return Array.prototype.some.call(obj, callbackfn, "hello!");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js
new file mode 100644
index 000000000..a292c6912
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js",
+
+ description: "Array.prototype.some - non-indexed properties are not called",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val === 11;
+ }
+
+ var obj = { 0: 9, 10: 8, non_index_property: 11, length: 20 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && (2 === called);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js
new file mode 100644
index 000000000..be743fa19
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-c-ii-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js",
+
+description: "Array.prototype.some - callbackfn takes 3 arguments",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ if(arguments.length === 3) //verify if callbackfn was called with 3 parameters
+ return false;
+ else
+ return true;
+ }
+
+ var arr = [0,1,true,null,new Object(),"five"];
+ arr[999999] = -6.6;
+
+ if(arr.some(callbackfn) === false)
+ return true;
+
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js
new file mode 100644
index 000000000..3cb6de9d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js",
+
+ description: "Array.prototype.some - callbackfn called with correct parameters (thisArg is correct)",
+
+ test: function testcase() {
+
+ var thisArg = { threshold: 10 };
+
+ function callbackfn(val, idx, obj) {
+ return this === thisArg;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return Array.prototype.some.call(obj, callbackfn, thisArg);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js
new file mode 100644
index 000000000..6cee3cca2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js",
+
+ description: "Array.prototype.some - callbackfn called with correct parameters (kValue is correct)",
+
+ test: function testcase() {
+
+ var firstIndex = false;
+ var secondIndex = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ firstIndex = (val === 11);
+ return false;
+ }
+ if (idx === 1) {
+ secondIndex = (val === 12);
+ return false;
+ }
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js
new file mode 100644
index 000000000..0f9af3727
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js",
+
+ description: "Array.prototype.some - callbackfn called with correct parameters (the index k is correct)",
+
+ test: function testcase() {
+
+ var firstIndex = false;
+ var secondIndex = false;
+
+ function callbackfn(val, idx, obj) {
+ if (val === 11) {
+ firstIndex = (idx === 0);
+ return false;
+ }
+ if (val === 12) {
+ secondIndex = (idx === 1);
+ return false;
+ }
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js
new file mode 100644
index 000000000..4bf3b3cfa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js",
+
+ description: "Array.prototype.some - callbackfn called with correct parameters (this object O is correct)",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ return obj === o;
+ }
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js
new file mode 100644
index 000000000..c49b819de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-7-c-ii-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js",
+
+description: "Array.prototype.some immediately returns true if callbackfn returns true",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ if(idx > 5)
+ return true;
+ else
+ return false;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+
+ if(arr.some(callbackfn) === true && callCnt === 7)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js
new file mode 100644
index 000000000..115947549
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js",
+
+ description: "Array.prototype.some - k values are passed in ascending numeric order",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2, 3, 4, 5];
+ var lastIdx = 0;
+ var called = 0;
+
+ function callbackfn(val, idx, o) {
+ called++;
+ if (lastIdx !== idx) {
+ return true;
+ } else {
+ lastIdx++;
+ return false;
+ }
+ }
+
+ return !arr.some(callbackfn) && arr.length === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js
new file mode 100644
index 000000000..eaa7a8e4d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js",
+
+ description: "Array.prototype.some - k values are accessed during each iteration and not prior to starting the loop",
+
+ test: function testcase() {
+
+ var kIndex = [];
+
+ //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(val, idx, obj) {
+ //Each position should be visited one time, which means k is accessed one time during iterations.
+ if (typeof kIndex[idx] === "undefined") {
+ //when current position is visited, its previous index should has been visited.
+ if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") {
+ return true;
+ }
+ kIndex[idx] = 1;
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ return ![11, 12, 13, 14].some(callbackfn, undefined);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js
new file mode 100644
index 000000000..b4ae5325f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js",
+
+ description: "Array.prototype.some - arguments to callbackfn are self consistent",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, length: 1 };
+ var thisArg = {};
+
+ function callbackfn() {
+ return this === thisArg && arguments[0] === 11 && arguments[1] === 0 && arguments[2] === obj;
+ }
+
+ return Array.prototype.some.call(obj, callbackfn, thisArg);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js
new file mode 100644
index 000000000..8ad280cfe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js",
+
+ description: "Array.prototype.some - unhandled exceptions happened in callbackfn terminate iteration",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx > 0) {
+ accessed = true;
+ }
+ if (idx === 0) {
+ throw new Error("Exception occurred in callbackfn");
+ }
+ return false;
+ }
+
+ var obj = { 0: 9, 1: 100, 10: 11, length: 20 };
+
+ try {
+ Array.prototype.some.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return ex instanceof Error && !accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js
new file mode 100644
index 000000000..9b66a3c9f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js",
+
+ description: "Array.prototype.some - element changed by callbackfn on previous iterations is observed",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ obj[idx + 1] = 11;
+ }
+ return val > 10;
+ }
+
+ var obj = { 0: 9, 1: 8, length: 2 };
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js
new file mode 100644
index 000000000..16dfac6ad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js",
+
+ description: "Array.prototype.some - callbackfn is called with 0 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return true;
+ }
+
+ return [11, 12].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js
new file mode 100644
index 000000000..3de8254ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js",
+
+ description: "Array.prototype.some - return value of callbackfn is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return undefined;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js
new file mode 100644
index 000000000..97daf0db3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return Infinity;
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js
new file mode 100644
index 000000000..e98e33d26
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return -Infinity;
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js
new file mode 100644
index 000000000..d79ffa5ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return NaN;
+ }
+
+ return ![11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js
new file mode 100644
index 000000000..8ac04ae67
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js",
+
+ description: "Array.prototype.some - return value of callbackfn is an empty string",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return "";
+ }
+
+ return ![11].some(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js
new file mode 100644
index 000000000..02721aff0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a non-empty string",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return "non-empty string";
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js
new file mode 100644
index 000000000..fb1dc63d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js",
+
+ description: "Array.prototype.some - return value of callbackfn is Function object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return function () { };
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js
new file mode 100644
index 000000000..d841a1f75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js",
+
+ description: "Array.prototype.some - return value of callbackfn is an Array object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Array(10);
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js
new file mode 100644
index 000000000..26d7bff7a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a String object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new String();
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js
new file mode 100644
index 000000000..a9a93b0e9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a Boolean object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Boolean();
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js
new file mode 100644
index 000000000..412c24168
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a Number object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Number();
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js
new file mode 100644
index 000000000..8889497bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js",
+
+ description: "Array.prototype.some - return value of callbackfn is null",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return null;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js
new file mode 100644
index 000000000..09b94789d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js",
+
+ description: "Array.prototype.some - return value of callbackfn is the Math object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return Math;
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js
new file mode 100644
index 000000000..6c88d18aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a Date object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Date();
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js
new file mode 100644
index 000000000..6caf53e9c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a RegExp object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new RegExp();
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js
new file mode 100644
index 000000000..22c45713b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js",
+
+ description: "Array.prototype.some - return value of callbackfn is the JSON object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return JSON;
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js
new file mode 100644
index 000000000..234ebb65b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js",
+
+ description: "Array.prototype.some - return value of callbackfn is an Error object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new EvalError();
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js
new file mode 100644
index 000000000..f524e09ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js",
+
+ description: "Array.prototype.some - return value of callbackfn is the Arguments object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return arguments;
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js
new file mode 100644
index 000000000..19c818090
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js",
+
+ description: "Array.prototype.some - return value (new Boolean(false)) of callbackfn is treated as true value",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return new Boolean(false);
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js
new file mode 100644
index 000000000..e7460223c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a boolean (value is false)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return false;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return !Array.prototype.some.call(obj, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js
new file mode 100644
index 000000000..04642e8ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a boolean (value is true)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ return Array.prototype.some.call(obj, callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js
new file mode 100644
index 000000000..8949ce394
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 0;
+ }
+
+ return ![11].some(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js
new file mode 100644
index 000000000..b96be6f5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return +0;
+ }
+
+ return ![11].some(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js
new file mode 100644
index 000000000..82e822a72
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return -0;
+ }
+
+ return ![11].some(callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js
new file mode 100644
index 000000000..8b5c0f16f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is positive number)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 5;
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js
new file mode 100644
index 000000000..9fa167a6b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.17-7-c-iii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js",
+
+ description: "Array.prototype.some - return value of callbackfn is a number (value is negative number)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return -5;
+ }
+
+ return [11].some(callbackfn);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js
new file mode 100644
index 000000000..f199c0087
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (empty array)",
+
+test: function testcase() {
+ function cb(){}
+ var i = [].some(cb);
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js
new file mode 100644
index 000000000..c40c197ab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-10",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js",
+
+description: "Array.prototype.some - subclassed array when length is reduced",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 2;
+
+ function cb(val)
+ {
+ if(val > 2)
+ return true;
+ else
+ return false;
+ }
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js
new file mode 100644
index 000000000..81dabf9e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-11",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js",
+
+description: "Array.prototype.some returns false when all calls to callbackfn return false",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ return false;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+
+ if(arr.some(callbackfn) === false && callCnt === 10)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js
new file mode 100644
index 000000000..027018ed9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-12",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js",
+
+description: "Array.prototype.some doesn't mutate the array on which it is called on",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ return true;
+ }
+ var arr = [1,2,3,4,5];
+ arr.some(callbackfn);
+ if(arr[0] === 1 &&
+ arr[1] === 2 &&
+ arr[2] === 3 &&
+ arr[3] === 4 &&
+ arr[4] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js
new file mode 100644
index 000000000..a803520f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-13",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js",
+
+description: "Array.prototype.some doesn't visit expandos",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ return false;
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+ arr["i"] = 10;
+ arr[true] = 11;
+
+ if(arr.some(callbackfn) === false && callCnt === 10)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js
new file mode 100644
index 000000000..37c1cbc86
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ function cb(){}
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js
new file mode 100644
index 000000000..3409ce7af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ function cb(){}
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js
new file mode 100644
index 000000000..87a0cf5dc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ function cb(){}
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js
new file mode 100644
index 000000000..7308a8405
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ function cb(){}
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js
new file mode 100644
index 000000000..c78782487
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ function cb(){}
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js
new file mode 100644
index 000000000..b36c037fb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ function cb(){}
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js
new file mode 100644
index 000000000..8028a246f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.17-8-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js",
+
+description: "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with []",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ var i = f.some(cb);
+
+ if (i === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.some);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js
new file mode 100644
index 000000000..7d85321cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js",
+
+description: "Array.prototype.forEach must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.forEach;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js
new file mode 100644
index 000000000..a86e978bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js",
+
+description: "Array.prototype.forEach.length must be 1",
+
+test: function testcase() {
+ if (Array.prototype.forEach.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js
new file mode 100644
index 000000000..da762209d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js",
+
+ description: "Array.prototype.forEach applied to undefined",
+
+ test: function testcase() {
+ try {
+ Array.prototype.forEach.call(undefined); // TypeError is thrown if value is undefined
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js
new file mode 100644
index 000000000..9f7eeddf0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js",
+
+ description: "Array.prototype.forEach applied to the Math object",
+
+ test: function testcase() {
+ var result = false;
+
+ function callbackfn(val, idx, obj) {
+ result = ('[object Math]' === Object.prototype.toString.call(obj));
+ }
+
+ try {
+ Math.length = 1;
+ Math[0] = 1;
+ Array.prototype.forEach.call(Math, callbackfn);
+ return result;
+ } finally {
+ delete Math[0];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js
new file mode 100644
index 000000000..bcae50b8a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js",
+
+ description: "Array.prototype.forEach applied to Date object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof Date;
+ }
+
+ var obj = new Date();
+ obj.length = 1;
+ obj[0] = 1;
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js
new file mode 100644
index 000000000..374e26392
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js",
+
+ description: "Array.prototype.forEach applied to RegExp object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof RegExp;
+ }
+
+ var obj = new RegExp();
+ obj.length = 1;
+ obj[0] = 1;
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js
new file mode 100644
index 000000000..f17686325
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js",
+
+ description: "Array.prototype.forEach applied to the JSON object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = ('[object JSON]' === Object.prototype.toString.call(obj));
+ }
+
+ try {
+ JSON.length = 1;
+ JSON[0] = 1;
+ Array.prototype.forEach.call(JSON, callbackfn);
+ return result;
+ } finally {
+ delete JSON.length;
+ delete JSON[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js
new file mode 100644
index 000000000..66e797a8d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js",
+
+ description: "Array.prototype.forEach applied to Error object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof Error;
+ }
+
+ var obj = new Error();
+ obj.length = 1;
+ obj[0] = 1;
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js
new file mode 100644
index 000000000..4f328aa93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js",
+
+ description: "Array.prototype.forEach applied to the Arguments object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = ('[object Arguments]' === Object.prototype.toString.call(obj));
+ }
+
+ var obj = (function () {
+ return arguments;
+ }("a", "b"));
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js
new file mode 100644
index 000000000..949f94957
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js",
+
+ description: "Array.prototype.forEach applied to null",
+
+ test: function testcase() {
+ try {
+ Array.prototype.forEach.call(null); // TypeError is thrown if value is null
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js
new file mode 100644
index 000000000..cb4398125
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js",
+
+ description: "Array.prototype.forEach applied to boolean primitive",
+
+ test: function testcase() {
+ var result = false;
+
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof Boolean;
+ }
+
+ try {
+ Boolean.prototype[0] = true;
+ Boolean.prototype.length = 1;
+
+ Array.prototype.forEach.call(false, callbackfn);
+ return result;
+
+ } finally {
+ delete Boolean.prototype[0];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js
new file mode 100644
index 000000000..3d5180d42
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js",
+
+ description: "Array.prototype.forEach applied to Boolean object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof Boolean;
+ }
+
+ var obj = new Boolean(true);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js
new file mode 100644
index 000000000..6a971e471
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js",
+
+ description: "Array.prototype.forEach applied to number primitive",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof Number;
+ }
+
+ try {
+ Number.prototype[0] = 1;
+ Number.prototype.length = 1;
+
+ Array.prototype.forEach.call(2.5, callbackfn);
+ return result;
+ } finally {
+ delete Number.prototype[0];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js
new file mode 100644
index 000000000..87030be96
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js",
+
+ description: "Array.prototype.forEach applied to Number object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof Number;
+ }
+
+ var obj = new Number(-128);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js
new file mode 100644
index 000000000..ecd77225f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js",
+
+ description: "Array.prototype.forEach applied to string primitive",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof String;
+ }
+
+ Array.prototype.forEach.call("abc", callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js
new file mode 100644
index 000000000..181861829
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js",
+
+ description: "Array.prototype.forEach applied to String object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof String;
+ }
+
+ var obj = new String("abc");
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js
new file mode 100644
index 000000000..8b2b139aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js",
+
+ description: "Array.prototype.forEach applied to Function object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = obj instanceof Function;
+ }
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[0] = 11;
+ obj[1] = 9;
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js
new file mode 100644
index 000000000..ced793832
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js",
+
+ description: "Array.prototype.forEach - 'length' is own data property on an Array-like object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: 2
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js
new file mode 100644
index 000000000..a9c13d110
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js",
+
+ description: "Array.prototype.forEach applied to Array-like object, 'length' is an inherited accessor property",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ Array.prototype.forEach.call(child, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js
new file mode 100644
index 000000000..9c27ed50d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js",
+
+ description: "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12
+ };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js
new file mode 100644
index 000000000..6f0ef53f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js",
+
+ description: "Array.prototype.forEach - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array",
+
+ test: function testcase() {
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var obj = { 0: 12, 1: 11 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return !accessed;
+ } finally {
+ delete Object.prototype.length;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js
new file mode 100644
index 000000000..15fab8ffb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js",
+
+ description: "Array.prototype.forEach applied to the Array-like object that 'length' is inherited accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 11;
+ child[1] = 12;
+
+ Array.prototype.forEach.call(child, callbackfn);
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js
new file mode 100644
index 000000000..534b83a4d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js",
+
+ description: "Array.prototype.forEach applied to the Array-like object that 'length' property doesn't exist",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return !accessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js
new file mode 100644
index 000000000..4c48a8a22
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js",
+
+ description: "Array.prototype.forEach applied to the Arguments object, which implements its own property get method",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var func = function (a, b) {
+ arguments[2] = 9;
+ Array.prototype.forEach.call(arguments, callbackfn);
+ return result;
+ };
+
+ return func(12, 11);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js
new file mode 100644
index 000000000..cead0abfb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js",
+
+ description: "Array.prototype.forEach applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 3);
+ }
+
+ var str = new String("012");
+
+ Array.prototype.forEach.call(str, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js
new file mode 100644
index 000000000..e20d92e84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js",
+
+ description: "Array.prototype.forEach applied to Function object, which implements its own property get method",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var fun = function (a, b) {
+ return a + b;
+ };
+ fun[0] = 12;
+ fun[1] = 11;
+ fun[2] = 9;
+
+ Array.prototype.forEach.call(fun, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js
new file mode 100644
index 000000000..b72e72bbd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js",
+
+ description: "Array.prototype.forEach - 'length' is own data property on an Array",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ [12, 11].forEach(callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js
new file mode 100644
index 000000000..d747d8a15
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js",
+
+ description: "Array.prototype.forEach - 'length' is an own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ Array.prototype.forEach.call(child, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js
new file mode 100644
index 000000000..8d3fca26c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js",
+
+ description: "Array.prototype.forEach - 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+ var result = false;
+ var arrProtoLen;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+ [12, 11].forEach(callbackfn);
+ return result;
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js
new file mode 100644
index 000000000..eeebeaf88
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js",
+
+ description: "Array.prototype.forEach applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ Array.prototype.forEach.call(child, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js
new file mode 100644
index 000000000..b7cb4045f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js",
+
+ description: "Array.prototype.forEach applied to Array-like object, 'length' is an inherited data property",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var proto = { length: 2 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ Array.prototype.forEach.call(child, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js
new file mode 100644
index 000000000..24d2bb691
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js",
+
+ description: "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ obj[0] = 12;
+ obj[1] = 11;
+ obj[2] = 9;
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js
new file mode 100644
index 000000000..a07cc94c2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js",
+
+ description: "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ Array.prototype.forEach.call(child, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js
new file mode 100644
index 000000000..c8414ed43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js",
+
+ description: "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (obj.length === 2);
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ Array.prototype.forEach.call(child, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js
new file mode 100644
index 000000000..67d07b471
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js",
+
+ description: "Array.prototype.forEach - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 0, 1: 1, length: undefined };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js
new file mode 100644
index 000000000..132ed9851
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: NaN };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js
new file mode 100644
index 000000000..cd900321e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js",
+
+ description: "Array.prototype.forEach - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2" };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js
new file mode 100644
index 000000000..3a3e98e82
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js",
+
+ description: "Array.prototype.forEach - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "-4294967294" };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js
new file mode 100644
index 000000000..e9e4f5a1a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js",
+
+ description: "Array.prototype.forEach - 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+ var obj = { 1: 11, 2: 9, length: "2.5" };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js
new file mode 100644
index 000000000..df18db018
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js",
+
+ description: "Array.prototype.forEach - 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var accessed1 = false;
+ var accessed2 = false;
+ var accessed3 = false;
+
+ function callbackfn1(val, idx, obj) {
+ accessed1 = true;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ accessed2 = true;
+ }
+
+ function callbackfn3(val, idx, obj) {
+ accessed3 = true;
+ }
+
+ var obj1 = { 0: 9, length: "Infinity" };
+ var obj2 = { 0: 9, length: "-Infinity" };
+ var obj3 = { 0: 9, length: "+Infinity" };
+
+ Array.prototype.forEach.call(obj1, callbackfn1);
+ Array.prototype.forEach.call(obj2, callbackfn2);
+ Array.prototype.forEach.call(obj3, callbackfn3);
+
+ return !accessed1 && !accessed2 && !accessed3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js
new file mode 100644
index 000000000..740e0b29a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js",
+
+ description: "Array.prototype.forEach - 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2E0" };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js
new file mode 100644
index 000000000..62b7a196e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js",
+
+ description: "Array.prototype.forEach - 'length' is a string containing a hex number",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "0x0002" };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js
new file mode 100644
index 000000000..d3c4bf0fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js",
+
+ description: "Array.prototype.forEach - 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "0002.00" };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js
new file mode 100644
index 000000000..cf38acd17
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: "asdf!_" };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js
new file mode 100644
index 000000000..6cab500a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js",
+
+ description: "Array.prototype.forEach - value of 'length' is an Object which has an own toString method.",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ toString: function () {
+ return '2';
+ }
+ }
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js
new file mode 100644
index 000000000..3fafa1ef6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a boolean (value is true)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = { 0: 11, 1: 9, length: true };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js
new file mode 100644
index 000000000..b2cacf874
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js",
+
+ description: "Array.prototype.forEach - value of 'length' is an Object which has an own valueOf method.",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ return 2;
+ }
+ }
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js
new file mode 100644
index 000000000..b7b9f23a1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js",
+
+ description: "Array.prototype.forEach - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var firstStepOccured = false;
+ var secondStepOccured = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ firstStepOccured = true;
+ return {};
+ },
+ toString: function () {
+ secondStepOccured = true;
+ return '2';
+ }
+ }
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult && firstStepOccured && secondStepOccured;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js
new file mode 100644
index 000000000..72be71142
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js
@@ -0,0 +1,69 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js",
+
+ description: "Array.prototype.forEach throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var firstStepOccured = false;
+ var secondStepOccured = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 12,
+
+ length: {
+ valueOf: function () {
+ firstStepOccured = true;
+ return {};
+ },
+ toString: function () {
+ secondStepOccured = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.forEach.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && !accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js
new file mode 100644
index 000000000..5375baee3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js",
+
+ description: "Array.prototype.forEach uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ child.toString = function () {
+ toStringAccessed = true;
+ return '1';
+ };
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: child
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js
new file mode 100644
index 000000000..9488c1ee0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: 2.685
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js
new file mode 100644
index 000000000..19fd85727
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: -4294967294.5
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js
new file mode 100644
index 000000000..6d429f6de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js",
+
+ description: "Array.prototype.forEach - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = {
+ 0: 12,
+ length: 4294967296
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js
new file mode 100644
index 000000000..66a18f1b7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js",
+
+ description: "Array.prototype.forEach - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult = (val > 10);
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: 4294967297
+ };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js
new file mode 100644
index 000000000..26a49d562
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 1, 1: 1, length: 0 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js
new file mode 100644
index 000000000..f890f2dfd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 11, length: +0 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js
new file mode 100644
index 000000000..b211fe083
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 11, length: -0 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js
new file mode 100644
index 000000000..6369d238a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is positive)",
+
+ test: function testcase() {
+
+ var testResult1 = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult1 = (val > 10);
+ }
+
+ var obj = { 1: 11, 2: 9, length: 2 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js
new file mode 100644
index 000000000..e257ccfe9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is negative)",
+
+ test: function testcase() {
+
+ var testResult1 = false;
+
+ function callbackfn(val, idx, obj) {
+ testResult1 = (val > 10);
+ }
+
+ var obj = { 1: 11, 2: 9, length: -4294967294 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js
new file mode 100644
index 000000000..37da48603
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: Infinity };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js
new file mode 100644
index 000000000..a45bad554
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js",
+
+ description: "Array.prototype.forEach - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: -Infinity };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js
new file mode 100644
index 000000000..91a21a741
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js",
+
+description: "Array.prototype.forEach throws TypeError if callbackfn is undefined",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.forEach();
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js
new file mode 100644
index 000000000..5e887341d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js",
+
+ description: "Array.prototype.forEach - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.forEach.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js
new file mode 100644
index 000000000..0c26b8a40
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js",
+
+ description: "Array.prototype.forEach - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.forEach.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js
new file mode 100644
index 000000000..9bcffd9fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-4-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js",
+
+ description: "Array.prototype.forEach - 'callbackfn' is a function",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ [11, 9].forEach(callbackfn);
+ return accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js
new file mode 100644
index 000000000..78b341a83
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js",
+
+description: "Array.prototype.forEach throws ReferenceError if callbackfn is unreferenced",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.forEach(foo);
+ }
+ catch(e) {
+ if(e instanceof ReferenceError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js
new file mode 100644
index 000000000..0f8a34a3b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js",
+
+description: "Array.prototype.forEach throws TypeError if callbackfn is null",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.forEach(null);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js
new file mode 100644
index 000000000..172a81bd8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js",
+
+description: "Array.prototype.forEach throws TypeError if callbackfn is boolean",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.forEach(true);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js
new file mode 100644
index 000000000..be57901fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js",
+
+description: "Array.prototype.forEach throws TypeError if callbackfn is number",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.forEach(5);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js
new file mode 100644
index 000000000..a41e505ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js",
+
+description: "Array.prototype.forEach throws TypeError if callbackfn is string",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.forEach("abc");
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js
new file mode 100644
index 000000000..cd3f80870
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js",
+
+description: "Array.prototype.forEach throws TypeError if callbackfn is Object without Call internal method",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.forEach(new Object());
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js
new file mode 100644
index 000000000..bb3de167d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-4-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js",
+
+ description: "Array.prototype.forEach - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.forEach.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js
new file mode 100644
index 000000000..0f2eb4690
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js",
+
+ description: "Array.prototype.forEach - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.forEach.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js
new file mode 100644
index 000000000..1fcd0a09e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.18-5-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js",
+
+ description: "Array.prototype.forEach - thisArg not passed",
+
+ test: function testcase() {
+ this._15_4_4_18_5_1 = true;
+ var _15_4_4_18_5_1 = false;
+ var result;
+ function callbackfn(val, idx, obj) {
+ result = this._15_4_4_18_5_1;
+ }
+ var arr = [1];
+ arr.forEach(callbackfn)
+ return !result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js
new file mode 100644
index 000000000..a67c15419
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js",
+
+ description: "Array.prototype.forEach - Array Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objArray = [];
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objArray);
+ }
+
+ [11].forEach(callbackfn, objArray);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js
new file mode 100644
index 000000000..a6234015d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js",
+
+ description: "Array.prototype.forEach - String Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objString = new String();
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objString);
+ }
+
+ [11].forEach(callbackfn, objString);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js
new file mode 100644
index 000000000..1616e8637
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js",
+
+ description: "Array.prototype.forEach - Boolean Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objBoolean = new Boolean();
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objBoolean);
+ }
+
+ [11].forEach(callbackfn, objBoolean);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js
new file mode 100644
index 000000000..3e2b805eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js",
+
+ description: "Array.prototype.forEach - Number Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objNumber = new Number();
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objNumber);
+ }
+
+ [11].forEach(callbackfn, objNumber);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js
new file mode 100644
index 000000000..54d2fb69c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js",
+
+ description: "Array.prototype.forEach - the Math object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (this === Math);
+ }
+
+ [11].forEach(callbackfn, Math);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js
new file mode 100644
index 000000000..8c39acd43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js",
+
+ description: "Array.prototype.forEach - Date Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objDate = new Date();
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objDate);
+ }
+
+ [11].forEach(callbackfn, objDate);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js
new file mode 100644
index 000000000..54dc32b8d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js",
+
+ description: "Array.prototype.forEach - RegExp Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objRegExp = new RegExp();
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objRegExp);
+ }
+
+ [11].forEach(callbackfn, objRegExp);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js
new file mode 100644
index 000000000..f9aa7ae70
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js",
+
+ description: "Array.prototype.forEach - the JSON object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (this === JSON);
+ }
+
+ [11].forEach(callbackfn, JSON);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js
new file mode 100644
index 000000000..1e9c6b200
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js",
+
+ description: "Array.prototype.forEach - Error Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objError = new RangeError();
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objError);
+ }
+
+ [11].forEach(callbackfn, objError);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js
new file mode 100644
index 000000000..c7695c296
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js",
+
+ description: "Array.prototype.forEach - the Arguments object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var arg;
+
+ function callbackfn(val, idx, obj) {
+ result = (this === arg);
+ }
+
+ (function fun() {
+ arg = arguments;
+ }(1, 2, 3));
+
+ [11].forEach(callbackfn, arg);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js
new file mode 100644
index 000000000..9370adca9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js",
+
+description: "Array.prototype.forEach - thisArg is Object",
+
+test: function testcase() {
+ var res = false;
+ var o = new Object();
+ o.res = true;
+ var result;
+ function callbackfn(val, idx, obj)
+ {
+ result = this.res;
+ }
+
+ var arr = [1];
+ arr.forEach(callbackfn,o)
+ if( result === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js
new file mode 100644
index 000000000..9f6a57e21
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js",
+
+ description: "Array.prototype.forEach - boolean primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+
+ function callbackfn(val, idx, obj) {
+ result = (this.valueOf() === false);
+ }
+
+ [11].forEach(callbackfn, false);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js
new file mode 100644
index 000000000..3e7c8e612
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js",
+
+ description: "Array.prototype.forEach - number primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (this.valueOf() === 101);
+ }
+
+ [11].forEach(callbackfn, 101);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js
new file mode 100644
index 000000000..7c361fdd9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js",
+
+ description: "Array.prototype.forEach - string primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (this.valueOf() === "abc");
+ }
+
+ [11].forEach(callbackfn, "abc");
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js
new file mode 100644
index 000000000..0443f4f7e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js",
+
+description: "Array.prototype.forEach - thisArg is Array",
+
+test: function testcase() {
+ var res = false;
+ var a = new Array();
+ a.res = true;
+ var result;
+ function callbackfn(val, idx, obj)
+ {
+ result = this.res;
+ }
+
+ var arr = [1];
+ arr.forEach(callbackfn,a)
+ if( result === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js
new file mode 100644
index 000000000..fda86434d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js",
+
+description: "Array.prototype.forEach - thisArg is object from object template(prototype)",
+
+test: function testcase() {
+ var res = false;
+ var result;
+ function callbackfn(val, idx, obj)
+ {
+ result = this.res;
+ }
+
+ function foo(){}
+ foo.prototype.res = true;
+ var f = new foo();
+ var arr = [1];
+ arr.forEach(callbackfn,f)
+ if( result === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js
new file mode 100644
index 000000000..72ed105a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js",
+
+description: "Array.prototype.forEach - thisArg is object from object template",
+
+test: function testcase() {
+ var res = false;
+ var result;
+ function callbackfn(val, idx, obj)
+ {
+ result = this.res;
+ }
+
+ function foo(){}
+ var f = new foo();
+ f.res = true;
+
+ var arr = [1];
+ arr.forEach(callbackfn,f)
+ if( result === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js
new file mode 100644
index 000000000..7d602289d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-5-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js",
+
+description: "Array.prototype.forEach - thisArg is function",
+
+test: function testcase() {
+ var res = false;
+ var result;
+ function callbackfn(val, idx, obj)
+ {
+ result = this.res;
+ }
+
+ function foo(){}
+ foo.res = true;
+
+ var arr = [1];
+ arr.forEach(callbackfn,foo)
+ if( result === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js
new file mode 100644
index 000000000..4fb0457e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js",
+
+ description: "Array.prototype.forEach - built-in functions can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+
+ function callbackfn(val, idx, obj) {
+ result = (this === eval);
+ }
+
+ [11].forEach(callbackfn, eval);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js
new file mode 100644
index 000000000..6745ca9b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js",
+
+ description: "Array.prototype.forEach - Function Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var result = false;
+ var objString = function () { };
+
+ function callbackfn(val, idx, obj) {
+ result = (this === objString);
+ }
+
+ [11].forEach(callbackfn, objString);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js
new file mode 100644
index 000000000..04204725c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js",
+
+description: "Array.prototype.forEach doesn't consider new elements added to array after the call",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ arr[2] = 3;
+ arr[5] = 6;
+ }
+
+ var arr = [1,2,,4,5];
+ arr.forEach(callbackfn);
+ if( callCnt === 5)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js
new file mode 100644
index 000000000..f5133e517
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js",
+
+description: "Array.prototype.forEach doesn't visit deleted elements in array after the call",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ if(callCnt == 0)
+ delete arr[3];
+ callCnt++;
+ }
+
+ var arr = [1,2,3,4,5];
+ arr.forEach(callbackfn)
+ if( callCnt === 4)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js
new file mode 100644
index 000000000..f974a2e5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js",
+
+description: "Array.prototype.forEach doesn't visit deleted elements when Array.length is decreased",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ arr.length=3;
+ callCnt++;
+ }
+
+ var arr = [1,2,3,4,5];
+ arr.forEach(callbackfn);
+ if( callCnt === 3)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js
new file mode 100644
index 000000000..5c862c934
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js",
+
+description: "Array.prototype.forEach doesn't consider newly added elements in sparse array",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ arr[1000] = 3;
+ callCnt++;
+ }
+
+ var arr = new Array(10);
+ arr[1] = 1;
+ arr[2] = 2;
+ arr.forEach(callbackfn);
+ if( callCnt === 2)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js
new file mode 100644
index 000000000..d9d964d65
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js",
+
+description: "Array.prototype.forEach visits deleted element in array after the call when same index is also present in prototype",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ delete arr[4];
+ callCnt++;
+ }
+
+ Array.prototype[4] = 5;
+
+ var arr = [1,2,3,4,5];
+ arr.forEach(callbackfn)
+ delete Array.prototype[4];
+ if( callCnt === 5)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js
new file mode 100644
index 000000000..0948b2a7b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.18-7-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js",
+
+ description: "Array.prototype.forEach - considers new value of elements in array after the call",
+
+ test: function testcase() {
+
+ var result = false;
+ var arr = [1, 2, 3, 4, 5];
+
+ function callbackfn(val, Idx, obj) {
+ arr[4] = 6;
+ if (val >= 6) {
+ result = true;
+ }
+ }
+
+ arr.forEach(callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js
new file mode 100644
index 000000000..6280954a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js",
+
+ description: "Array.prototype.forEach - no observable effects occur if len is 0",
+
+ test: function testcase() {
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 11, 1: 12, length: 0 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js
new file mode 100644
index 000000000..6454d4ef5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-b-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js",
+
+description: "Array.prototype.forEach - callbackfn not called for indexes never been assigned values",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ }
+
+ var arr = new Array(10);
+ arr[1] = undefined;
+ arr.forEach(callbackfn);
+ if( callCnt === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js
new file mode 100644
index 000000000..d59057a30
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-b-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js",
+
+ description: "Array.prototype.forEach - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 2 && val === "length") {
+ testResult = true;
+ }
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ obj[2] = "length";
+ return 3;
+ },
+ configurable: true
+ });
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js
new file mode 100644
index 000000000..a86a8b0cc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-b-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js",
+
+ description: "Array.prototype.forEach - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var testResult = true;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ if (idx === 8) {
+ testResult = false;
+ }
+ }
+ var obj = { 2: 6.99, 8: 19 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ delete obj[8];
+ return 10;
+ },
+ configurable: true
+ });
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return testResult && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js
new file mode 100644
index 000000000..86dee575a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js",
+
+ description: "Array.prototype.forEach - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = { };
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ testResult = (val === kValue);
+ }
+ }
+
+ var obj = { 5: kValue, length: 100 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js
new file mode 100644
index 000000000..6dc9ed28c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js",
+
+ description: "Array.prototype.forEach - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ testResult = (val === 11);
+ }
+ }
+
+ [11].forEach(callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js
new file mode 100644
index 000000000..3ec4890c2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js",
+
+ description: "Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ testResult = (val === 11);
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.forEach.call(arguments, callbackfn);
+ };
+
+ func(11);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js
new file mode 100644
index 000000000..23a7e63f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js",
+
+ description: "Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ var called = 0;
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (called !== 1 && !testResult) {
+ return;
+ }
+ if (idx === 0) {
+ testResult = (val === 11);
+ } else if (idx === 1) {
+ testResult = (val === 9);
+ } else {
+ testResult = false;
+ }
+ }
+
+ var func = function (a, b) {
+ Array.prototype.forEach.call(arguments, callbackfn);
+ };
+
+ func(11, 9);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js
new file mode 100644
index 000000000..85280bf97
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js",
+
+ description: "Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var called = 0;
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (called !== 1 && !testResult) {
+ return;
+ }
+ if (idx === 0) {
+ testResult = (val === 11);
+ } else if (idx === 1) {
+ testResult = (val === 12);
+ } else if (idx === 2) {
+ testResult = (val === 9);
+ } else {
+ testResult = false;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.forEach.call(arguments, callbackfn);
+ };
+
+ func(11, 12, 9);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js
new file mode 100644
index 000000000..eb9b8e407
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js",
+
+ description: "Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var kValue = "abc";
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ testResult = (val === kValue);
+ }
+ }
+
+ var proto = { 5: 100 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[5] = kValue;
+ child.length = 10;
+
+ Array.prototype.forEach.call(child, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js
new file mode 100644
index 000000000..7fa1b878e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js",
+
+ description: "Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ testResult = (val === 12);
+ }
+ }
+
+ try {
+ Array.prototype[0] = 11;
+
+ [12].forEach(callbackfn);
+
+ return testResult;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js
new file mode 100644
index 000000000..e39e85457
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js",
+
+ description: "Array.prototype.forEach - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = 'abc';
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ testResult = (val === kValue);
+ }
+ }
+
+ var proto = { 5: kValue };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 10;
+
+ Array.prototype.forEach.call(child, callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js
new file mode 100644
index 000000000..4cec36a84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js",
+
+ description: "Array.prototype.forEach - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 1) {
+ testResult = (val === 13);
+ }
+ }
+
+ try {
+ Array.prototype[1] = 13;
+
+ [, , , ].forEach(callbackfn);
+
+ return testResult;
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js
new file mode 100644
index 000000000..8ed151536
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-c-ii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js",
+
+description: "Array.prototype.forEach - callbackfn called with correct parameters",
+
+test: function testcase() {
+
+ var bPar = true;
+ var bCalled = false;
+ function callbackfn(val, idx, obj)
+ {
+ bCalled = true;
+ if(obj[idx] !== val)
+ bPar = false;
+ }
+
+ var arr = [0,1,true,null,new Object(),"five"];
+ arr[999999] = -6.6;
+ arr.forEach(callbackfn);
+ if(bCalled === true && bPar === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js
new file mode 100644
index 000000000..b4d31dda7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js",
+
+ description: "Array.prototype.forEach - callbackfn is called with 1 formal parameter",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val) {
+ result = (val > 10);
+ }
+
+ [11].forEach(callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js
new file mode 100644
index 000000000..1ee573ef7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js",
+
+ description: "Array.prototype.forEach - callbackfn is called with 2 formal parameter",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx) {
+ result = (val > 10 && arguments[2][idx] === val);
+ }
+
+ [11].forEach(callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js
new file mode 100644
index 000000000..3db492cce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js",
+
+ description: "Array.prototype.forEach - callbackfn is called with 3 formal parameter",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (val > 10 && obj[idx] === val);
+ }
+
+ [11].forEach(callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js
new file mode 100644
index 000000000..b5b7e3165
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js",
+
+ description: "Array.prototype.forEach - callbackfn that uses arguments",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn() {
+ result = (arguments[2][arguments[1]] === arguments[0]);
+ }
+
+ [11].forEach(callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-14.js
new file mode 100644
index 000000000..1c3039bc5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-14.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-14.js",
+
+ description: "Array.prototype.forEach - 'this' of 'callbackfn' is an object when 'T' is not an object('T' is undefined)",
+
+ test: function testcase() {
+
+ var result = false;
+
+ function callbackfn(val, idx, o) {
+ result = ('document' in this &&
+ 'open' in this &&
+ 'frames' in this);
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ Array.prototype.forEach.call(obj, callbackfn, undefined);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-15.js
new file mode 100644
index 000000000..8bcb3523b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-15.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-15.js",
+
+ description: "Array.prototype.forEach - 'this' of 'callbackfn' is an object when 'T' is not an object(T is null)",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, o) {
+ result = ('document' in this &&
+ 'open' in this &&
+ 'frames' in this);
+ }
+
+ var arr = [11];
+
+ arr.forEach(callbackfn, null);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js
new file mode 100644
index 000000000..c8b922798
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js",
+
+ description: "Array.prototype.forEach - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean)",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (this.valueOf() !== false);
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ Array.prototype.forEach.call(obj, callbackfn, false);
+ return !result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js
new file mode 100644
index 000000000..bcdbba38c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js",
+
+ description: "Array.prototype.forEach - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number)",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, o) {
+ result = (5 === this.valueOf());
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ Array.prototype.forEach.call(obj, callbackfn, 5);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js
new file mode 100644
index 000000000..e345f3a03
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js",
+
+ description: "Array.prototype.forEach - 'this' of 'callbackfn' is an String object when T is not an object (T is a string)",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = ('hello' === this.valueOf());
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ Array.prototype.forEach.call(obj, callbackfn, "hello");
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js
new file mode 100644
index 000000000..e90ca76fa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js",
+
+ description: "Array.prototype.forEach - non-indexed properties are not called",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var result = true;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ if (val === 8) {
+ result = false;
+ }
+ }
+
+ var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js
new file mode 100644
index 000000000..73e01d832
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-7-c-ii-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js",
+
+description: "Array.prototype.forEach - callbackfn takes 3 arguments",
+
+test: function testcase() {
+
+ var parCnt = 3;
+ var bCalled = false
+ function callbackfn(val, idx, obj)
+ {
+ bCalled = true;
+ if(arguments.length !== 3)
+ parCnt = arguments.length; //verify if callbackfn was called with 3 parameters
+ }
+
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+ arr.forEach(callbackfn);
+ if(bCalled === true && parCnt === 3)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js
new file mode 100644
index 000000000..6f6fb25b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js",
+
+ description: "Array.prototype.forEach - callbackfn called with correct parameters (thisArg is correct)",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(val, idx, obj) {
+ result = (10 === this.threshold);
+ }
+
+ var thisArg = { threshold: 10 };
+
+ var obj = { 0: 11, length: 1 };
+
+ Array.prototype.forEach.call(obj, callbackfn, thisArg);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js
new file mode 100644
index 000000000..69c8ba4fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js",
+
+ description: "Array.prototype.forEach - callbackfn called with correct parameters (kValue is correct)",
+
+ test: function testcase() {
+
+ var resultOne = false;
+ var resultTwo = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ resultOne = (val === 11);
+ }
+
+ if (idx === 1) {
+ resultTwo = (val === 12);
+ }
+
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return resultOne && resultTwo;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js
new file mode 100644
index 000000000..1952f34a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js",
+
+ description: "Array.prototype.forEach - callbackfn called with correct parameters (the index k is correct)",
+
+ test: function testcase() {
+
+ var resultOne = false;
+ var resultTwo = false;
+
+ function callbackfn(val, idx, obj) {
+ if (val === 11) {
+ resultOne = (idx === 0);
+ }
+
+ if (val === 12) {
+ resultTwo = (idx === 1);
+ }
+
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return resultOne && resultTwo;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js
new file mode 100644
index 000000000..8d9d47989
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js",
+
+ description: "Array.prototype.forEach - callbackfn called with correct parameters (this object O is correct)",
+
+ test: function testcase() {
+
+ var result = false;
+ var obj = { 0: 11, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ result = (obj === o);
+ }
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js
new file mode 100644
index 000000000..a833c8cce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js",
+
+ description: "Array.prototype.forEach - k values are passed in ascending numeric order",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2, 3, 4, 5];
+ var lastIdx = 0;
+ var called = 0;
+ var result = true;
+ function callbackfn(val, idx, o) {
+ called++;
+ if (lastIdx !== idx) {
+ result = false;
+ } else {
+ lastIdx++;
+ }
+ }
+
+ arr.forEach(callbackfn);
+ return result && arr.length === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js
new file mode 100644
index 000000000..5e2261de6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js",
+
+ description: "Array.prototype.forEach - k values are accessed during each iteration and not prior to starting the loop on an Array",
+
+ test: function testcase() {
+
+ var result = true;
+ var kIndex = [];
+
+ //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(val, idx, obj) {
+ //Each position should be visited one time, which means k is accessed one time during iterations.
+ if (typeof kIndex[idx] === "undefined") {
+ //when current position is visited, its previous index should has been visited.
+ if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") {
+ result = false;
+ }
+ kIndex[idx] = 1;
+ } else {
+ result = false;
+ }
+ }
+
+ [11, 12, 13, 14].forEach(callbackfn, undefined);
+
+ return result;
+ },
+
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js
new file mode 100644
index 000000000..a66c187db
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js",
+
+ description: "Array.prototype.forEach - arguments to callbackfn are self consistent",
+
+ test: function testcase() {
+
+ var result = false;
+ var obj = { 0: 11, length: 1 };
+ var thisArg = {};
+
+ function callbackfn() {
+ result = (this === thisArg &&
+ arguments[0] === 11 &&
+ arguments[1] === 0 &&
+ arguments[2] === obj);
+ }
+
+ Array.prototype.forEach.call(obj, callbackfn, thisArg);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js
new file mode 100644
index 000000000..a9a68c223
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js",
+
+ description: "Array.prototype.forEach - unhandled exceptions happened in callbackfn terminate iteration",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx > 0) {
+ accessed = true;
+ }
+ if (idx === 0) {
+ throw new Error("Exception occurred in callbackfn");
+ }
+ }
+
+ var obj = { 0: 11, 4: 10, 10: 8, length: 20 };
+
+ try {
+ Array.prototype.forEach.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return ex instanceof Error && !accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js
new file mode 100644
index 000000000..0f09ddde3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js",
+
+ description: "Array.prototype.forEach - element changed by callbackfn on previous iterations is observed",
+
+ test: function testcase() {
+
+ var result = false;
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ if (idx === 0) {
+ obj[idx + 1] = 8;
+ }
+
+ if (idx === 1) {
+ result = (val === 8);
+ }
+ }
+
+ Array.prototype.forEach.call(obj, callbackfn);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js
new file mode 100644
index 000000000..04263be8d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.18-7-c-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js",
+
+ description: "Array.prototype.forEach - callbackfn is called with 0 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+ function callbackfn() {
+ called++;
+ }
+
+ [11, 12].forEach(callbackfn);
+ return 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js
new file mode 100644
index 000000000..6cbb12b8a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (empty array)",
+
+test: function testcase() {
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = [].forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js
new file mode 100644
index 000000000..535f2a871
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-10",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js",
+
+description: "Array.prototype.forEach - subclassed array when length is reduced",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 1;
+
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js
new file mode 100644
index 000000000..72cd21e03
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-11",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js",
+
+description: "Array.prototype.forEach doesn't mutate the array on which it is called on",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ return true;
+ }
+ var arr = [1,2,3,4,5];
+ arr.forEach(callbackfn);
+ if(arr[0] === 1 &&
+ arr[1] === 2 &&
+ arr[2] === 3 &&
+ arr[3] === 4 &&
+ arr[4] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js
new file mode 100644
index 000000000..2bcda8176
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-12",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js",
+
+description: "Array.prototype.forEach doesn't visit expandos",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ }
+ var arr = [1,2,3,4,5];
+ arr["i"] = 10;
+ arr[true] = 11;
+
+ arr.forEach(callbackfn);
+ if(callCnt == 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js
new file mode 100644
index 000000000..df4ec7b0d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js
new file mode 100644
index 000000000..7a484d19d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js
new file mode 100644
index 000000000..4dad8a130
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js
new file mode 100644
index 000000000..9581609b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js
new file mode 100644
index 000000000..310824f04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js
new file mode 100644
index 000000000..b4d07f53b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js
new file mode 100644
index 000000000..b915a3192
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with []",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js
new file mode 100644
index 000000000..2ff2dbc7e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.18-8-9",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js",
+
+description: "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with [0]",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [0];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ var callCnt = 0;
+ function cb(){callCnt++}
+ var i = f.forEach(cb);
+ if (callCnt === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.forEach);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js
new file mode 100644
index 000000000..6ff5a7258
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js",
+
+description: "Array.prototype.map must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.map;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js
new file mode 100644
index 000000000..08ce8dbe4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js",
+
+description: "Array.prototype.map.length must be 1",
+
+test: function testcase() {
+ if (Array.prototype.map.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js
new file mode 100644
index 000000000..3e8cc3ad1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js",
+
+ description: "Array.prototype.map - applied to undefined",
+
+ test: function testcase() {
+ try {
+ Array.prototype.map.call(undefined); // TypeError is thrown if value is undefined
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js
new file mode 100644
index 000000000..015b7ef03
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js",
+
+ description: "Array.prototype.map - applied to the Math object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return ('[object Math]' === Object.prototype.toString.call(obj));
+ }
+
+ try {
+ Math.length = 1;
+ Math[0] = 1;
+ var testResult = Array.prototype.map.call(Math, callbackfn);
+ return testResult[0] === true;
+ } finally {
+ delete Math[0];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js
new file mode 100644
index 000000000..24622578c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js",
+
+ description: "Array.prototype.map - applied to Date object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Date;
+ }
+
+ var obj = new Date();
+ obj.length = 1;
+ obj[0] = 1;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js
new file mode 100644
index 000000000..e68bac392
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js",
+
+ description: "Array.prototype.map - applied to RegExp object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof RegExp;
+ }
+
+ var obj = new RegExp();
+ obj.length = 1;
+ obj[0] = 1;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js
new file mode 100644
index 000000000..f45c5a995
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js",
+
+ description: "Array.prototype.map - applied to the JSON object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return ('[object JSON]' === Object.prototype.toString.call(obj));
+ }
+
+ try {
+ JSON.length = 1;
+ JSON[0] = 1;
+ var testResult = Array.prototype.map.call(JSON, callbackfn);
+ return testResult[0] === true;
+ } finally {
+ delete JSON.length;
+ delete JSON[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js
new file mode 100644
index 000000000..01f153245
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js",
+
+ description: "Array.prototype.map - applied to Error object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Error;
+ }
+
+ var obj = new Error();
+ obj.length = 1;
+ obj[0] = 1;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js
new file mode 100644
index 000000000..755aaef0f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js",
+
+ description: "Array.prototype.map - applied to the Arguments object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return ('[object Arguments]' === Object.prototype.toString.call(obj));
+ }
+
+ var obj = (function () {
+ return arguments;
+ }("a", "b"));
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[1] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js
new file mode 100644
index 000000000..7c1745f6f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js",
+
+ description: "Array.prototype.map - applied to null",
+
+ test: function testcase() {
+ try {
+ Array.prototype.map.call(null); // TypeError is thrown if value is null
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js
new file mode 100644
index 000000000..fd850c51f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js",
+
+ description: "Array.prototype.map - applied to boolean primitive",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ try {
+ Boolean.prototype[0] = true;
+ Boolean.prototype.length = 1;
+
+ var testResult = Array.prototype.map.call(false, callbackfn);
+ return testResult[0] === true;
+ } finally {
+ delete Boolean.prototype[0];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js
new file mode 100644
index 000000000..03f1bdadc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js",
+
+ description: "Array.prototype.map - applied to Boolean object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ var obj = new Boolean(true);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true && testResult[1] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js
new file mode 100644
index 000000000..3c01034a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js",
+
+ description: "Array.prototype.map - applied to number primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ try {
+ Number.prototype[0] = 1;
+ Number.prototype.length = 1;
+
+ var testResult = Array.prototype.map.call(2.5, callbackfn);
+ return testResult[0] === true;
+ } finally {
+ delete Number.prototype[0];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js
new file mode 100644
index 000000000..d52e9a86b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js",
+
+ description: "Array.prototype.map - applied to Number object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ var obj = new Number(-128);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true && testResult[1] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js
new file mode 100644
index 000000000..21d60468b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js",
+
+ description: "Array.prototype.map - applied to string primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof String;
+ }
+
+ var testResult = Array.prototype.map.call("abc", callbackfn);
+
+ return testResult[0] === true && testResult[1] === true && testResult[2] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js
new file mode 100644
index 000000000..81f6d7d6b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js",
+
+ description: "Array.prototype.map - applied to String object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof String;
+ }
+
+ var obj = new String("abc");
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true && testResult[1] === true && testResult[2] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js
new file mode 100644
index 000000000..d5a75f1a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js",
+
+ description: "Array.prototype.map - applied to Function object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Function;
+ }
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[0] = 11;
+ obj[1] = 9;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true && testResult[1] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js
new file mode 100644
index 000000000..223bf977a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js",
+
+ description: "Array.prototype.map - applied to Array-like object when 'length' is an own data property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: 2
+ };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js
new file mode 100644
index 000000000..6b06e7fb9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js",
+
+ description: "Array.prototype.map - applied to Array-like object, 'length' is an inherited accessor property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js
new file mode 100644
index 000000000..b9ba4484b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js",
+
+ description: "Array.prototype.map - applied to Array-like object when 'length' is an own accessor property without a get function",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12
+ };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return 0 === testResult.length;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js
new file mode 100644
index 000000000..d2085ea59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js",
+
+ description: "Array.prototype.map - applied to the Array-like object when 'length' is own accessor property without a get function that overrides an inherited accessor property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var obj = { 0: 12, 1: 11 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return testResult.length === 0;
+ } finally {
+ delete Object.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js
new file mode 100644
index 000000000..09079f002
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js",
+
+ description: "Array.prototype.map - applied to the Array-like object when 'length' is inherited accessor property without a get function",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 11;
+ child[1] = 12;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return 0 === testResult.length;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js
new file mode 100644
index 000000000..0fbdd2d4e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js",
+
+ description: "Array.prototype.map - applied to the Array-like object that 'length' property doesn't exist",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return 0 === testResult.length;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js
new file mode 100644
index 000000000..19ed877c4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js",
+
+ description: "Array.prototype.map - applied to Arguments object, which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.map.call(arguments, callbackfn);
+ };
+
+ var testResult = func(12, 11);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js
new file mode 100644
index 000000000..9a4f757ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js",
+
+ description: "Array.prototype.map - applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return parseInt(val, 10) > 1;
+ }
+
+ var str = new String("432");
+ try {
+ String.prototype[3] = "1";
+ var testResult = Array.prototype.map.call(str, callbackfn);
+
+ return 3 === testResult.length;
+ } finally {
+ delete String.prototype[3];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js
new file mode 100644
index 000000000..d9cef9f13
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js",
+
+ description: "Array.prototype.map - applied to Function object, which implements its own property get method",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var fun = function (a, b) {
+ return a + b;
+ };
+ fun[0] = 12;
+ fun[1] = 11;
+ fun[2] = 9;
+
+ var testResult = Array.prototype.map.call(fun, callbackfn);
+
+ return 2 === testResult.length;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js
new file mode 100644
index 000000000..d303ae8a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js",
+
+ description: "Array.prototype.map - when 'length' is own data property on an Array",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var testResult = [12, 11].map(callbackfn);
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js
new file mode 100644
index 000000000..f411682c4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js",
+
+ description: "Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js
new file mode 100644
index 000000000..a81ea3b06
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js",
+
+ description: "Array.prototype.map - when 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+ var arrProtoLen;
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+ var testResult = [12, 11].map(callbackfn);
+ return testResult.length === 2;
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js
new file mode 100644
index 000000000..64adab0ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js",
+
+ description: "Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js
new file mode 100644
index 000000000..4a633d983
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js",
+
+ description: "Array.prototype.map - applied to Array-like object, 'length' is an inherited data property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var proto = { length: 2 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js
new file mode 100644
index 000000000..ce0fc080a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js",
+
+ description: "Array.prototype.map - applied to Array-like object, 'length' is an own accessor property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ obj[0] = 12;
+ obj[1] = 11;
+ obj[2] = 9;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js
new file mode 100644
index 000000000..6c85482c5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js",
+
+ description: "Array.prototype.map - applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js
new file mode 100644
index 000000000..0a5c0ad4c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js",
+
+ description: "Array.prototype.map - applied to Array-like object when 'length' is an own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return testResult.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js
new file mode 100644
index 000000000..67682d1d0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js",
+
+ description: "Array.prototype.map - value of 'length' is undefined",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { length: undefined };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js
new file mode 100644
index 000000000..a5ed00e3e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js",
+
+ description: "Array.prototype.map - value of 'length' is a number (value is NaN)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 9, length: NaN };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js
new file mode 100644
index 000000000..e296e89aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js",
+
+ description: "Array.prototype.map - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 11, 1: 9, 2: 12, length: "2" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js
new file mode 100644
index 000000000..2046e154c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js",
+
+ description: "Array.prototype.map - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 11, 1: 9, 2: 12, length: "-4294967294" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js
new file mode 100644
index 000000000..40beab148
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js",
+
+ description: "Array.prototype.map - value of 'length' is string that is able to convert to number primitive (value is a decimal number)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 11, 1: 9, 2: 12, length: "2.5" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js
new file mode 100644
index 000000000..ccbfbdecd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js",
+
+ description: "Array.prototype.map - 'length' is a string containing Infinity",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 9, length: "Infinity" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js
new file mode 100644
index 000000000..a112ea398
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js",
+
+ description: "Array.prototype.map - 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 11, 1: 9, 2: 12, length: "2E0" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js
new file mode 100644
index 000000000..d9e55b17e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js",
+
+ description: "Array.prototype.map - 'length' is a string containing a hex number",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 11, 1: 9, 2: 12, length: "0x0002" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js
new file mode 100644
index 000000000..83316c1ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js",
+
+ description: "Array.prototype.map - when 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 11, 1: 9, 2: 12, length: "0002.00" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js
new file mode 100644
index 000000000..5041e9563
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js",
+
+ description: "Array.prototype.map - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { length: "asdf!_" };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js
new file mode 100644
index 000000000..ee2ac040c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js",
+
+ description: "Array.prototype.map - value of 'length' is an Object which has an own toString method",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+
+ length: {
+ toString: function () {
+ return '2';
+ }
+ }
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js
new file mode 100644
index 000000000..449d7e9ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js",
+
+ description: "Array.prototype.map on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: true };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js
new file mode 100644
index 000000000..2e4cc8c73
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js",
+
+ description: "Array.prototype.map - value of 'length' is an Object which has an own valueOf method",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+
+ length: {
+ valueOf: function () {
+ return 2;
+ }
+ }
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js
new file mode 100644
index 000000000..28f96832d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js",
+
+ description: "Array.prototype.map - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var firstStepOccured = false;
+ var secondStepOccured = false;
+ var obj = {
+ 0: 11,
+ 1: 9,
+
+ length: {
+ valueOf: function () {
+ firstStepOccured = true;
+ return {};
+ },
+ toString: function () {
+ secondStepOccured = true;
+ return '2';
+ }
+ }
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2 && firstStepOccured && secondStepOccured;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js
new file mode 100644
index 000000000..f7242b3e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js",
+
+ description: "Array.prototype.map throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 12,
+
+ length: {
+ valueOf: function () {
+ return {};
+ },
+ toString: function () {
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.map.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js
new file mode 100644
index 000000000..0066c7aca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js
@@ -0,0 +1,72 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js",
+
+ description: "Array.prototype.map uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ child.toString = function () {
+ toStringAccessed = true;
+ return '1';
+ };
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: child
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2 && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js
new file mode 100644
index 000000000..0cb3bf780
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js",
+
+ description: "Array.prototype.map - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: 2.685
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js
new file mode 100644
index 000000000..dd790674f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js",
+
+ description: "Array.prototype.map - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: -4294967294.5
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js
new file mode 100644
index 000000000..80c3e23c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js",
+
+ description: "Array.prototype.map - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 12,
+ length: 4294967296
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js
new file mode 100644
index 000000000..3fde2b7fc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js",
+
+ description: "Array.prototype.map - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: 4294967297
+ };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+ return newArr.length === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js
new file mode 100644
index 000000000..b6e42dbcd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js",
+
+ description: "Array.prototype.map - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: 0 };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js
new file mode 100644
index 000000000..4171895ec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js",
+
+ description: "Array.prototype.map - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: +0 };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js
new file mode 100644
index 000000000..5b8a9d8cf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js",
+
+ description: "Array.prototype.map - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 11, length: -0 };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js
new file mode 100644
index 000000000..6d374e4e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js",
+
+ description: "Array.prototype.map - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 10, 1: 12, 2: 9, length: 2 };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js
new file mode 100644
index 000000000..a61ae20a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js",
+
+ description: "Array.prototype.map - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 10, 1: 12, 2: 9, length: -4294967294 };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js
new file mode 100644
index 000000000..dfc8c5782
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js",
+
+ description: "Array.prototype.map - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 9, length: Infinity };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js
new file mode 100644
index 000000000..29c5ff3d0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js",
+
+ description: "Array.prototype.map - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val < 10;
+ }
+
+ var obj = { 0: 9, length: -Infinity };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js
new file mode 100644
index 000000000..59f419c9f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js",
+
+description: "Array.prototype.map throws TypeError if callbackfn is undefined",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.map();
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js
new file mode 100644
index 000000000..af6ceb171
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js",
+
+ description: "Array.prototype.map - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.map.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js
new file mode 100644
index 000000000..6689fd066
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js",
+
+ description: "Array.prototype.map - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.map.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js
new file mode 100644
index 000000000..02a630335
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-4-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js",
+
+ description: "Array.prototype.map - 'callbackfn' is a function",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var testResult = [11, 9].map(callbackfn);
+ return testResult.length === 2 && testResult[0] === true && testResult[1] === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js
new file mode 100644
index 000000000..9bdd3af46
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js",
+
+description: "Array.prototype.map throws ReferenceError if callbackfn is unreferenced",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.map(foo);
+ }
+ catch(e) {
+ if(e instanceof ReferenceError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js
new file mode 100644
index 000000000..0b736c634
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js",
+
+description: "Array.prototype.map throws TypeError if callbackfn is null",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.map(null);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js
new file mode 100644
index 000000000..df24b6d41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js",
+
+description: "Array.prototype.map throws TypeError if callbackfn is boolean",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.map(true);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js
new file mode 100644
index 000000000..31f84a4bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js",
+
+description: "Array.prototype.map throws TypeError if callbackfn is number",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.map(5);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js
new file mode 100644
index 000000000..82e425ee8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js",
+
+description: "Array.prototype.map throws TypeError if callbackfn is string",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.map("abc");
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js
new file mode 100644
index 000000000..bd7f15aa3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js",
+
+description: "Array.prototype.map throws TypeError if callbackfn is Object without Call internal method",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.map(new Object());
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js
new file mode 100644
index 000000000..e69a1dcbe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-4-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js",
+
+ description: "Array.prototype.map - Side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.map.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js
new file mode 100644
index 000000000..e717e1b2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js",
+
+ description: "Array.prototype.map - Side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.map.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js
new file mode 100644
index 000000000..421d54464
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-5-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js",
+
+description: "Array.prototype.map - thisArg not passed",
+
+test: function testcase() {
+ try {
+ window._15_4_4_19_5_1 = true;
+ var _15_4_4_19_5_1 = false;
+
+ function callbackfn(val, idx, obj) {
+ return this._15_4_4_19_5_1;
+ }
+ var srcArr = [1];
+ var resArr = srcArr.map(callbackfn);
+ if( resArr[0] === true)
+ return true;
+
+ return false;
+ }
+ finally {
+ delete window._15_4_4_19_5_1;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js
new file mode 100644
index 000000000..38dc46663
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js",
+
+ description: "Array.prototype.map - Array object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objArray = new Array(2);
+
+ function callbackfn(val, idx, obj) {
+ return this === objArray;
+ }
+
+ var testResult = [11].map(callbackfn, objArray);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js
new file mode 100644
index 000000000..89dce5548
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js",
+
+ description: "Array.prototype.map - String object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objString = new String();
+
+ function callbackfn(val, idx, obj) {
+ return this === objString;
+ }
+
+ var testResult = [11].map(callbackfn, objString);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js
new file mode 100644
index 000000000..323ee9cbd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js",
+
+ description: "Array.prototype.map - Boolean object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objBoolean = new Boolean();
+
+ function callbackfn(val, idx, obj) {
+ return this === objBoolean;
+ }
+
+ var testResult = [11].map(callbackfn, objBoolean);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js
new file mode 100644
index 000000000..680ba439d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js",
+
+ description: "Array.prototype.map - Number object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objNumber = new Number();
+
+ function callbackfn(val, idx, obj) {
+ return this === objNumber;
+ }
+
+ var testResult = [11].map(callbackfn, objNumber);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js
new file mode 100644
index 000000000..93db6d40a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js",
+
+ description: "Array.prototype.map - the Math object can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this === Math;
+ }
+
+ var testResult = [11].map(callbackfn, Math);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js
new file mode 100644
index 000000000..7707ed002
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js",
+
+ description: "Array.prototype.map - Date object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objDate = new Date();
+
+ function callbackfn(val, idx, obj) {
+ return this === objDate;
+ }
+
+ var testResult = [11].map(callbackfn, objDate);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js
new file mode 100644
index 000000000..b25a7a074
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js",
+
+ description: "Array.prototype.map - RegExp object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objRegExp = new RegExp();
+
+ function callbackfn(val, idx, obj) {
+ return this === objRegExp;
+ }
+
+ var testResult = [11].map(callbackfn, objRegExp);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js
new file mode 100644
index 000000000..0ffb201e1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js",
+
+ description: "Array.prototype.map - the JSON object can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this === JSON;
+ }
+
+ var testResult = [11].map(callbackfn, JSON);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js
new file mode 100644
index 000000000..86807fefe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js",
+
+ description: "Array.prototype.map - Error object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objError = new RangeError();
+
+ function callbackfn(val, idx, obj) {
+ return this === objError;
+ }
+
+ var testResult = [11].map(callbackfn, objError);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js
new file mode 100644
index 000000000..544e7c76c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js",
+
+ description: "Array.prototype.map - the Arguments object can be used as thisArg",
+
+ test: function testcase() {
+
+ var arg;
+
+ function callbackfn(val, idx, obj) {
+ return this === arg;
+ }
+
+ arg = (function () {
+ return arguments;
+ }(1, 2, 3));
+
+ var testResult = [11].map(callbackfn, arg);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js
new file mode 100644
index 000000000..b7911bd59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js",
+
+description: "Array.prototype.map - thisArg is Object",
+
+test: function testcase() {
+ var res = false;
+ var o = new Object();
+ o.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var srcArr = [1];
+ var resArr = srcArr.map(callbackfn,o);
+ if( resArr[0] === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js
new file mode 100644
index 000000000..e9d3f4a1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js",
+
+ description: "Array.prototype.map - boolean primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === false;
+ }
+
+ var testResult = [11].map(callbackfn, false);
+ return testResult[0] === true;
+ },
+
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js
new file mode 100644
index 000000000..45163269e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js",
+
+ description: "Array.prototype.map - number primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === 101;
+ }
+
+ var testResult = [11].map(callbackfn, 101);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js
new file mode 100644
index 000000000..a9dd86c60
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js",
+
+ description: "Array.prototype.map - string primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === "abc";
+ }
+
+ var testResult = [11].map(callbackfn, "abc");
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js
new file mode 100644
index 000000000..4c430a6ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js",
+
+description: "Array.prototype.map - thisArg is Array",
+
+test: function testcase() {
+ var res = false;
+ var a = new Array();
+ a.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var srcArr = [1];
+ var resArr = srcArr.map(callbackfn,a);
+ if( resArr[0] === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js
new file mode 100644
index 000000000..cbcc3626f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js",
+
+description: "Array.prototype.map - thisArg is object from object template(prototype)",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.prototype.res = true;
+ var f = new foo();
+
+ var srcArr = [1];
+ var resArr = srcArr.map(callbackfn,f);
+ if( resArr[0] === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js
new file mode 100644
index 000000000..f27a3ad72
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js",
+
+description: "Array.prototype.map - thisArg is object from object template",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ var f = new foo();
+ f.res = true;
+
+ var srcArr = [1];
+ var resArr = srcArr.map(callbackfn,f);
+ if( resArr[0] === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js
new file mode 100644
index 000000000..5eb524f1f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-5-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js",
+
+description: "Array.prototype.map - thisArg is function",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.res = true;
+
+ var srcArr = [1];
+ var resArr = srcArr.map(callbackfn,foo);
+ if( resArr[0] === true)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js
new file mode 100644
index 000000000..ebf820e23
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js",
+
+ description: "Array.prototype.map - built-in functions can be used as thisArg",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this === eval;
+ }
+
+ var testResult = [11].map(callbackfn, eval);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js
new file mode 100644
index 000000000..595ffa865
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js",
+
+ description: "Array.prototype.map - Function object can be used as thisArg",
+
+ test: function testcase() {
+
+ var objFunction = function () { };
+
+ function callbackfn(val, idx, obj) {
+ return this === objFunction;
+ }
+
+ var testResult = [11].map(callbackfn, objFunction);
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js
new file mode 100644
index 000000000..e30896cc0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-6-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js",
+
+ description: "Array.prototype.map - Array.isArray returns true when input argument is the ourput array",
+
+ test: function testcase() {
+
+ var newArr = [11].map(function () { });
+
+ return Array.isArray(newArr);
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Array.isArray);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js
new file mode 100644
index 000000000..b4b816ce2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 1909 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-6-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js",
+
+ description: "Array.prototype.map - the returned array is instanceof Array",
+
+ test: function testcase() {
+
+ var newArr = [11].map(function () { });
+
+ return newArr instanceof Array;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js
new file mode 100644
index 000000000..c0311076c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js",
+
+description: "Array.prototype.map doesn't consider new elements added to array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ srcArr[2] = 3;
+ srcArr[5] = 6;
+ return 1;
+ }
+
+ var srcArr = [1,2,,4,5];
+ var resArr = srcArr.map(callbackfn);
+ if(resArr.length === 5)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js
new file mode 100644
index 000000000..102d11c13
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js",
+
+description: "Array.prototype.map considers new value of elements in array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ srcArr[4] = -1;
+ if(val > 0)
+ return 1;
+ else
+ return 0;
+ }
+
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.map(callbackfn);
+ if(resArr.length === 5 && resArr[4] === 0)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js
new file mode 100644
index 000000000..03ea75e66
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js",
+
+description: "Array.prototype.map doesn't visit deleted elements in array after the call",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ delete srcArr[4];
+ if(val > 0)
+ return 1;
+ else
+ return 0;
+
+ }
+
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.map(callbackfn);
+ if(resArr.length === 5 && resArr[4] === undefined)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js
new file mode 100644
index 000000000..a869563d3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js",
+
+description: "Array.prototype.map doesn't visit deleted elements when Array.length is decreased",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ srcArr.length = 2;
+ callCnt++;
+ return 1;
+ }
+
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.map(callbackfn);
+ if(resArr.length === 5 && callCnt === 2 && resArr[2] === undefined)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js
new file mode 100644
index 000000000..fa2e5842c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js",
+
+description: "Array.prototype.map doesn't consider newly added elements in sparse array",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ srcArr[1000] = 3;
+ callCnt++;
+ return val;
+ }
+
+ var srcArr = new Array(10);
+ srcArr[1] = 1;
+ srcArr[2] = 2;
+ var resArr = srcArr.map(callbackfn);
+ if( resArr.length === 10 && callCnt === 2)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js
new file mode 100644
index 000000000..2bb2814cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js",
+
+description: "Array.prototype.map visits deleted element in array after the call when same index is also present in prototype",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ delete srcArr[4];
+ if(val > 0)
+ return 1;
+ else
+ return 0;
+
+ }
+
+ Array.prototype[4] = 5;
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.map(callbackfn);
+ delete Array.prototype[4];
+ if(resArr.length === 5 && resArr[4] === 1)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js
new file mode 100644
index 000000000..284c5f5cb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.19-8-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js",
+
+ description: "Array.prototype.map successful to delete the object in callbackfn",
+
+ test: function testcase() {
+ var obj = {};
+ obj.srcArr = [1, 2, 3, 4, 5];
+
+ function callbackfn(val, idx, obj) {
+ delete obj.srcArr;
+ if (val > 0)
+ return 1;
+ else
+ return 0;
+ }
+
+ var resArr = obj.srcArr.map(callbackfn);
+ return resArr.toString() === "1,1,1,1,1" && !obj.hasOwnProperty("arr");
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js
new file mode 100644
index 000000000..322d42147
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-b-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js",
+
+description: "Array.prototype.map - callbackfn not called for indexes never been assigned values",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ return 1;
+ }
+
+ var srcArr = new Array(10);
+ srcArr[1] = undefined; //explicitly assigning a value
+ var resArr = srcArr.map(callbackfn);
+ if( resArr.length === 10 && callCnt === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js
new file mode 100644
index 000000000..244096ed4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.19-8-b-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js",
+
+ description: "Array.prototype.map - added properties in step 2 are visible here",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ if (idx === 2 && val === "length") {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ obj[2] = "length";
+ return 3;
+ },
+ configurable: true
+ });
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return testResult[2] === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js
new file mode 100644
index 000000000..d9c36b543
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-b-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js",
+
+ description: "Array.prototype.map - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ if (idx === 2) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ var obj = { 2: 6.99, 8: 19 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ delete obj[2];
+ return 10;
+ },
+ configurable: true
+ });
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return typeof testResult[2] === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js
new file mode 100644
index 000000000..9134eb790
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js",
+
+ description: "Array.prototype.map - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = {};
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ var obj = { 5: kValue, length: 100 };
+
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr[5] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js
new file mode 100644
index 000000000..636dbb928
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js",
+
+ description: "Array.prototype.map - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var kValue = {};
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ var arr = [kValue];
+
+ var newArr = arr.map(callbackfn);
+
+ return newArr[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js
new file mode 100644
index 000000000..a727fccab
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js",
+
+ description: "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 9;
+ } else {
+ return false;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.map.call(arguments, callbackfn);
+ };
+
+ var testResult = func(9);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js
new file mode 100644
index 000000000..5af7c6edd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js",
+
+ description: "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 9;
+ } else if (idx === 1) {
+ return val === 11;
+ } else {
+ return false;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.map.call(arguments, callbackfn);
+ };
+
+ var testResult = func(9, 11);
+
+ return testResult[0] === true && testResult[1] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js
new file mode 100644
index 000000000..a375312ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js",
+
+ description: "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 9;
+ } else if (idx === 1) {
+ return val === 11;
+ } else if (idx === 2) {
+ return val === 12;
+ } else {
+ return false;
+ }
+
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.map.call(arguments, callbackfn);
+ };
+
+ var testResult = func(9, 11, 12);
+
+ return testResult[0] === true && testResult[1] === true && testResult[2] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js
new file mode 100644
index 000000000..db2c05c65
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js",
+
+ description: "Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = "abc";
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ var proto = { 5: 12, length: 10 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[5] = kValue;
+
+ var testResult = Array.prototype.map.call(child, callbackfn);
+
+ return testResult[5] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js
new file mode 100644
index 000000000..eedf44b5d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js",
+
+ description: "Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var kValue = "abc";
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ try {
+ Array.prototype[0] = 11;
+
+ var testResult = [kValue].map(callbackfn);
+
+ return testResult[0] === true;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js
new file mode 100644
index 000000000..79ff2bd96
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js",
+
+ description: "Array.prototype.map - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = "abc";
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 5) {
+ return val === kValue;
+ }
+ return false;
+ }
+
+ var proto = { 5: kValue, length: 10 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ var newArr = Array.prototype.map.call(child, callbackfn);
+
+ return newArr[5] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js
new file mode 100644
index 000000000..95b08cfbf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js",
+
+ description: "Array.prototype.map - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ if (idx === 1) {
+ return val === 13;
+ }
+ return false;
+ }
+
+ try {
+ Array.prototype[1] = 13;
+
+ var newArr = [, , , ].map(callbackfn);
+
+ return newArr[1] === true;
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js
new file mode 100644
index 000000000..fa8527aa0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-c-ii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js",
+
+description: "Array.prototype.map - callbackfn called with correct parameters",
+
+test: function testcase() {
+
+ var bPar = true;
+ var bCalled = false;
+ function callbackfn(val, idx, obj)
+ {
+ bCalled = true;
+ if(obj[idx] !== val)
+ bPar = false;
+ }
+
+ var srcArr = [0,1,true,null,new Object(),"five"];
+ srcArr[999999] = -6.6;
+ resArr = srcArr.map(callbackfn);
+
+ if(bCalled === true && bPar === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js
new file mode 100644
index 000000000..c1c005de4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js",
+
+ description: "Array.prototype.map - callbackfn is called with 1 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn(val) {
+ return val > 10;
+ }
+
+ var testResult = [11].map(callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js
new file mode 100644
index 000000000..e017cbc9b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js",
+
+ description: "Array.prototype.map - callbackfn is called with 2 formal parameters",
+
+ test: function testcase() {
+ function callbackfn(val, idx) {
+ return (val > 10 && arguments[2][idx] === val);
+ }
+
+ var testResult = [11].map(callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js
new file mode 100644
index 000000000..e8a2951b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js",
+
+ description: "Array.prototype.map - callbackfn is called with 3 formal parameters",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return (val > 10 && obj[idx] === val);
+ }
+
+ var testResult = [11].map(callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js
new file mode 100644
index 000000000..110bea8ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js",
+
+ description: "Array.prototype.map - callbackfn that uses arguments object to get parameter value",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return arguments[2][arguments[1]] === arguments[0];
+ }
+
+ var testResult = [11].map(callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-14.js
new file mode 100644
index 000000000..ef6dc7ab8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-14.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-14.js",
+
+ description: "Array.prototype.map - 'this' object when T is not an object (T is undefined)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn, undefined);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-15.js
new file mode 100644
index 000000000..2d5b958b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-15.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-15.js",
+
+ description: "Array.prototype.map - 'this' object when T is not an object (T is null)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn, null);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js
new file mode 100644
index 000000000..5b250a8fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js",
+
+ description: "Array.prototype.map - 'this' object when T is not an object (T is a boolean primitive)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === false;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn, false);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js
new file mode 100644
index 000000000..c8e66b10e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js",
+
+ description: "Array.prototype.map - 'this' object when T is not an object (T is a number)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === 5;
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn, 5);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js
new file mode 100644
index 000000000..b3432f5ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js",
+
+ description: "Array.prototype.map - 'this' object when T is not an object (T is a string primitive)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === "hello!";
+ }
+
+ var obj = { 0: 11, length: 2 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn, "hello!");
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js
new file mode 100644
index 000000000..a18357654
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js",
+
+ description: "Array.prototype.map - non-indexed properties are not called.",
+
+ test: function testcase() {
+
+ var called = 0;
+ var result = false;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (val === 11) {
+ result = true;
+ }
+ return true;
+ }
+
+ var obj = { 0: 9, non_index_property: 11, length: 20 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return !result && testResult[0] === true && called === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js
new file mode 100644
index 000000000..5f2db641e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-c-ii-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js",
+
+description: "Array.prototype.map - callbackfn takes 3 arguments",
+
+test: function testcase() {
+
+ var parCnt = 3;
+ var bCalled = false
+ function callbackfn(val, idx, obj)
+ {
+ bCalled = true;
+ if(arguments.length !== 3)
+ parCnt = arguments.length; //verify if callbackfn was called with 3 parameters
+ }
+
+ var srcArr = [0,1,2,3,4,5,6,7,8,9];
+ var resArr = srcArr.map(callbackfn);
+ if(bCalled === true && parCnt === 3)
+ return true;
+
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js
new file mode 100644
index 000000000..cd6004f1a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js",
+
+ description: "Array.prototype.map - callbackfn called with correct parameters (thisArg is correct)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.threshold === 10;
+ }
+
+ var thisArg = { threshold: 10 };
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn, thisArg);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js
new file mode 100644
index 000000000..1e7419a90
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js",
+
+ description: "Array.prototype.map - callbackfn called with correct parameters (kValue is correct)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 11;
+ }
+
+ if (idx === 1) {
+ return val === 12;
+ }
+
+ return false;
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true && testResult[1] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js
new file mode 100644
index 000000000..5cbc0f152
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js",
+
+ description: "Array.prototype.map - callbackfn called with correct parameters (the index k is correct)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (val === 11) {
+ return idx === 0;
+ }
+
+ if (val === 12) {
+ return idx === 1;
+ }
+
+ return false;
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true && testResult[1] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js
new file mode 100644
index 000000000..dffc20513
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js",
+
+ description: "Array.prototype.map - callbackfn called with correct parameters (this object O is correct)",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ return obj === o;
+ }
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js
new file mode 100644
index 000000000..439857998
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js",
+
+ description: "Array.prototype.map - k values are passed in acending numeric order",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2, 3, 4, 5];
+ var lastIdx = 0;
+ var called = 0;
+ var result = true;
+ function callbackfn(val, idx, o) {
+ called++;
+ if (lastIdx !== idx) {
+ result = false;
+ } else {
+ lastIdx++;
+ }
+ }
+
+ arr.map(callbackfn);
+ return result && arr.length === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js
new file mode 100644
index 000000000..00facf8dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js",
+
+ description: "Array.prototype.map - k values are accessed during each iteration and not prior to starting the loop.",
+
+ test: function testcase() {
+
+ var kIndex = [];
+
+ //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(val, idx, obj) {
+ //Each position should be visited one time, which means k is accessed one time during iterations.
+ if (typeof kIndex[idx] === "undefined") {
+ //when current position is visited, its previous index should has been visited.
+ if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") {
+ return true;
+ }
+ kIndex[idx] = 1;
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ var testResult = [11, 12, 13, 14].map(callbackfn);
+
+ return testResult.length === 4 && testResult[0] === false &&
+ testResult[1] === false && testResult[2] === false &&
+ testResult[3] === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js
new file mode 100644
index 000000000..e51f31efc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js",
+
+ description: "Array.prototype.map - arguments to callbackfn are self consistent.",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, length: 1 };
+ var thisArg = {};
+
+ function callbackfn() {
+ return this === thisArg &&
+ arguments[0] === 11 &&
+ arguments[1] === 0 &&
+ arguments[2] === obj;
+ }
+
+ var testResult = Array.prototype.map.call(obj, callbackfn, thisArg);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js
new file mode 100644
index 000000000..ba2b5a513
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js",
+
+ description: "Array.prototype.map - unhandled exceptions happened in callbackfn terminate iteration",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ if (idx > 0) {
+ accessed = true;
+ }
+ if (idx === 0) {
+ throw new Error("Exception occurred in callbackfn");
+ }
+ }
+
+ var obj = { 0: 11, 4: 10, 10: 8, length: 20 };
+
+ try {
+ Array.prototype.map.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return ex instanceof Error && !accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js
new file mode 100644
index 000000000..3107a4c0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js",
+
+ description: "Array.prototype.map - element changed by callbackfn on previous iterations is observed",
+
+ test: function testcase() {
+
+ var obj = { 0: 9, 1: 12, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ if (idx === 0) {
+ obj[idx + 1] = 8;
+ }
+ return val > 10;
+ }
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult[1] === false;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js
new file mode 100644
index 000000000..9775238d8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js",
+
+ description: "Array.prototype.map - callbackfn with 0 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return true;
+ }
+
+ var testResult = [11].map(callbackfn);
+
+ return testResult[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js
new file mode 100644
index 000000000..b961b3081
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-8-c-iii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js",
+
+description: "Array.prototype.map - getOwnPropertyDescriptor(all true) of returned array element",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj){
+ if(val % 2)
+ return (2 * val + 1);
+ else
+ return (val / 2);
+ }
+ var srcArr = [0,1,2,3,4];
+ var resArr = srcArr.map(callbackfn);
+ if (resArr.length > 0){
+ var desc = Object.getOwnPropertyDescriptor(resArr, 1)
+ if(desc.value === 3 && //srcArr[1] = 2*1+1 = 3
+ desc.writable === true &&
+ desc.enumerable === true &&
+ desc.configurable === true){
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js
new file mode 100644
index 000000000..8a18f7669
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-iii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js",
+
+ description: "Array.prototype.map - value of returned array element equals to 'mappedValue'",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val;
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ return newArr[0] === obj[0] && newArr[1] === obj[1];
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js
new file mode 100644
index 000000000..8da47ea9f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-iii-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js",
+
+ description: "Array.prototype.map - value of returned array element can be overwritten",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 11;
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ try {
+ var tempVal = newArr[1];
+ newArr[1] += 1;
+ return newArr[1] !== tempVal;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js
new file mode 100644
index 000000000..0c3b2bbdf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-iii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js",
+
+ description: "Array.prototype.map - value of returned array element can be enumerated",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, length: 2 };
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ var prop;
+ var enumerable = false;
+ for (prop in newArr) {
+ if (newArr.hasOwnProperty(prop)) {
+ if (prop === "0") {
+ enumerable = true;
+ }
+ }
+ }
+
+ return enumerable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js
new file mode 100644
index 000000000..727491ea5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-8-c-iii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js",
+
+ description: "Array.prototype.map - value of returned array element can be changed or deleted",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+ var newArr = Array.prototype.map.call(obj, callbackfn);
+
+ try {
+ var tempVal = newArr[1];
+ delete newArr[1];
+ return tempVal !== undefined && newArr[1] === undefined;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js
new file mode 100644
index 000000000..3bafa71a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-9-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js",
+
+description: "Array.prototype.map doesn't mutate the Array on which it is called on",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ return true;
+ }
+ var srcArr = [1,2,3,4,5];
+ srcArr.map(callbackfn);
+ if(srcArr[0] === 1 &&
+ srcArr[1] === 2 &&
+ srcArr[2] === 3 &&
+ srcArr[3] === 4 &&
+ srcArr[4] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js
new file mode 100644
index 000000000..11f3af5f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-9-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js",
+
+ description: "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var Foo = function () { };
+ Foo.prototype = [1, 2, 3];
+ var obj = new Foo();
+ obj.length = {
+ valueOf: function () {
+ return 0;
+ }
+ };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return testResult.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js
new file mode 100644
index 000000000..5dd868fb0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.19-9-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js",
+
+ description: "Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+
+ test: function testcase() {
+ function Foo() { }
+ Foo.prototype = [1, 2, 3];
+
+ var f = new Foo();
+
+ var o = {
+ toString: function () {
+ return '0';
+ }
+ };
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ function cb() { }
+ var a = Array.prototype.map.call(f, cb);
+
+ if (Array.isArray(a) && a.length === 0) {
+ return true;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js
new file mode 100644
index 000000000..2e4eff2c3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.19-9-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js",
+
+ description: "Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with [])",
+
+ test: function testcase() {
+ function Foo() { }
+ Foo.prototype = [1, 2, 3];
+ var f = new Foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb() { }
+ var a = Array.prototype.map.call(f, cb);
+
+ if (Array.isArray(a) && a.length === 0) {
+ return true;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map) && fnExists(Array.isArray);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js
new file mode 100644
index 000000000..4f2db4871
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-9-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js",
+
+ description: "Array.prototype.map - if there are no side effects of the functions, O is unmodified",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val > 2;
+ }
+
+ var arr = [1, 2, 3, 4];
+
+ arr.map(callbackfn);
+
+ return 1 === arr[0] && 2 === arr[1] && 3 === arr[2] && 4 === arr[3] && 4 === called;
+
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js
new file mode 100644
index 000000000..6dda78043
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-9-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js",
+
+description: "Array.prototype.map returns new Array with same number of elements and values the result of callbackfn",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ return val + 10;
+ }
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.map(callbackfn);
+ if(resArr[0] === 11 &&
+ resArr[1] === 12 &&
+ resArr[2] === 13 &&
+ resArr[3] === 14 &&
+ resArr[4] === 15)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js
new file mode 100644
index 000000000..ea654c048
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-9-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js",
+
+description: "Array.prototype.map - subclassed array when length is reduced",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 1;
+
+ function cb(){}
+ var a = f.map(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js
new file mode 100644
index 000000000..678630e87
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.19-9-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js",
+
+description: "Array.prototype.map doesn't visit expandos",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ }
+ var srcArr = [1,2,3,4,5];
+ srcArr["i"] = 10;
+ srcArr[true] = 11;
+
+ var resArr = srcArr.map(callbackfn);
+ if(callCnt == 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js
new file mode 100644
index 000000000..ef8373044
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-9-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js",
+
+ description: "Array.prototype.map - empty array to be returned if 'length' is 0 (empty array)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var obj = { 0: 9, 1: 8, length: 0 };
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+
+ return testResult.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js
new file mode 100644
index 000000000..5d1b27e91
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-9-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js",
+
+ description: "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10;
+ }
+
+ var Foo = function () { };
+ Foo.prototype = [1, 2, 3];
+ var obj = new Foo();
+ obj.length = null;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return testResult.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js
new file mode 100644
index 000000000..ebda81970
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-9-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js",
+
+ description: "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var Foo = function () { };
+ Foo.prototype = [1, 2, 3];
+ var obj = new Foo();
+ obj.length = false;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return testResult.length === 0;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js
new file mode 100644
index 000000000..ac7b3bc6b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-9-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js",
+
+ description: "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var Foo = function () { };
+ Foo.prototype = [1, 2, 3];
+ var obj = new Foo();
+ obj.length = 0;
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return testResult.length === 0;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js
new file mode 100644
index 000000000..ec6a1b278
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.19-9-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js",
+
+ description: "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val > 10;
+ }
+
+ var Foo = function () { };
+ Foo.prototype = [1, 2, 3];
+ var obj = new Foo();
+ obj.length = '0';
+
+ var testResult = Array.prototype.map.call(obj, callbackfn);
+ return testResult.length === 0;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.map);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js
new file mode 100644
index 000000000..2cd3adcd3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js",
+
+description: "Array.prototype.filter must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.filter;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js
new file mode 100644
index 000000000..8c61ad004
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js",
+
+description: "Array.prototype.filter.length must be 1",
+
+test: function testcase() {
+ if (Array.prototype.filter.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js
new file mode 100644
index 000000000..50e08324a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.20-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js",
+
+ description: "Array.prototype.filter applied to undefined throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.filter.call(undefined); // TypeError is thrown if value is undefined
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js
new file mode 100644
index 000000000..1262abd38
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js",
+
+ description: "Array.prototype.filter applied to the Math object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return '[object Math]' === Object.prototype.toString.call(obj);
+ }
+
+ try {
+ Math.length = 1;
+ Math[0] = 1;
+ var newArr = Array.prototype.filter.call(Math, callbackfn);
+ return newArr[0] === 1;
+ } finally {
+ delete Math[0];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js
new file mode 100644
index 000000000..d6a49dd79
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js",
+
+ description: "Array.prototype.filter applied to Date object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Date;
+ }
+
+ var obj = new Date();
+ obj.length = 1;
+ obj[0] = 1;
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr[0] === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js
new file mode 100644
index 000000000..b2b85be78
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js",
+
+ description: "Array.prototype.filter applied to RegExp object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof RegExp;
+ }
+
+ var obj = new RegExp();
+ obj.length = 2;
+ obj[1] = true;
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr[0] === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js
new file mode 100644
index 000000000..672e94c60
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js",
+
+ description: "Array.prototype.filter applied to the JSON object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return '[object JSON]' === Object.prototype.toString.call(JSON);
+ }
+
+ try {
+ JSON.length = 1;
+ JSON[0] = 1;
+ var newArr = Array.prototype.filter.call(JSON, callbackfn);
+ return newArr[0] === 1;
+ } finally {
+ delete JSON.length;
+ delete JSON[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js
new file mode 100644
index 000000000..368ee6e95
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.20-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js",
+
+ description: "Array.prototype.filter applied to Error object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Error;
+ }
+
+ var obj = new Error();
+ obj.length = 1;
+ obj[0] = 1;
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr[0] === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js
new file mode 100644
index 000000000..03c27ea11
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js",
+
+ description: "Array.prototype.filter applied to the Arguments object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return '[object Arguments]' === Object.prototype.toString.call(obj);
+ }
+
+ var obj = (function () {
+ return arguments;
+ }("a", "b"));
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr[0] === "a" && newArr[1] === "b";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js
new file mode 100644
index 000000000..62817fce4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.20-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js",
+
+ description: "Array.prototype.filter applied to null throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.filter.call(null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js
new file mode 100644
index 000000000..04e51530f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js",
+
+ description: "Array.prototype.filter applied to boolean primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ try {
+ Boolean.prototype[0] = true;
+ Boolean.prototype.length = 1;
+
+ var newArr = Array.prototype.filter.call(false, callbackfn);
+ return newArr[0] === true;
+
+ } finally {
+ delete Boolean.prototype[0];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js
new file mode 100644
index 000000000..e3976363e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.20-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js",
+
+ description: "Array.prototype.filter applied to Boolean Object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ var obj = new Boolean(true);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr[0] === 11 && newArr[1] === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js
new file mode 100644
index 000000000..bb39cb5ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js",
+
+ description: "Array.prototype.filter applied to number primitive",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ try {
+ Number.prototype[0] = 1;
+ Number.prototype.length = 1;
+
+ var newArr = Array.prototype.filter.call(2.5, callbackfn);
+ return newArr[0] === 1;
+ } finally {
+ delete Number.prototype[0];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js
new file mode 100644
index 000000000..3b5a09951
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+
+ id: "15.4.4.20-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js",
+
+ description: "Array.prototype.filter applied to Number object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ var obj = new Number(-128);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr[0] === 11 && newArr[1] === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js
new file mode 100644
index 000000000..a39406860
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js",
+
+ description: "Array.prototype.filter applied to string primitive",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof String;
+ }
+
+ var newArr = Array.prototype.filter.call("abc", callbackfn);
+
+ return newArr[0] === "a";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js
new file mode 100644
index 000000000..d95d9d4ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js",
+
+ description: "Array.prototype.filter applied to String object",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return obj instanceof String;
+ }
+
+ var obj = new String("abc");
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr[0] === "a";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js
new file mode 100644
index 000000000..14a568f34
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js",
+
+ description: "Array.prototype.filter applied to Function object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj instanceof Function;
+ }
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[0] = 11;
+ obj[1] = 9;
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr[0] === 11 && newArr[1] === 9;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js
new file mode 100644
index 000000000..be1cfe32d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-10-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js",
+
+description: "Array.prototype.filter doesn't mutate the Array on which it is called on",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ return true;
+ }
+ var srcArr = [1,2,3,4,5];
+ srcArr.filter(callbackfn);
+ if(srcArr[0] === 1 &&
+ srcArr[1] === 2 &&
+ srcArr[2] === 3 &&
+ srcArr[3] === 4 &&
+ srcArr[4] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js
new file mode 100644
index 000000000..e7f3d1715
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-10-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js",
+
+description: "Array.prototype.filter returns new Array with length equal to number of true returned by callbackfn",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ if(val % 2)
+ return true;
+ else
+ return false;
+ }
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.filter(callbackfn);
+ if(resArr.length === 3 &&
+ resArr[0] === 1 &&
+ resArr[1] === 3 &&
+ resArr[2] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js
new file mode 100644
index 000000000..59a93aa1b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-10-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js",
+
+description: "Array.prototype.filter - subclassed array when length is reduced",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 1;
+
+ function cb(){return true;}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js
new file mode 100644
index 000000000..7209ebe15
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-10-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js",
+
+description: "Array.prototype.filter doesn't visit expandos",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ }
+ var srcArr = [1,2,3,4,5];
+ srcArr["i"] = 10;
+ srcArr[true] = 11;
+
+ var resArr = srcArr.filter(callbackfn);
+ if(callCnt == 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js
new file mode 100644
index 000000000..13c6220ec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is own data property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: 2
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js
new file mode 100644
index 000000000..4101cc742
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is inherited accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js
new file mode 100644
index 000000000..80833cc21
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is own accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12
+ };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js
new file mode 100644
index 000000000..304451cc6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js",
+
+ description: "Array.prototype.filter - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var obj = { 0: 12, 1: 11 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 0 && !accessed;
+ } finally {
+ delete Object.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js
new file mode 100644
index 000000000..560eeaacf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js",
+
+ description: "Array.prototype.filter applied to the Array-like object that 'length' is inherited accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 11;
+ child[1] = 12;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js
new file mode 100644
index 000000000..8ad7d6952
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js",
+
+ description: "Array.prototype.filter applied to the Array-like object that 'length property doesn't exist",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js
new file mode 100644
index 000000000..088f28964
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js",
+
+ description: "Array.prototype.filter applied to the Arguments object, which implements its own property get method",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var func = function (a, b) {
+ var newArr = Array.prototype.filter.call(arguments, callbackfn);
+ return newArr.length === 2;
+ };
+
+ return func(12, 11);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js
new file mode 100644
index 000000000..e5cff1f2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js",
+
+ description: "Array.prototype.filter applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 3;
+ }
+
+ var str = new String("012");
+
+ var newArr = Array.prototype.filter.call(str, callbackfn);
+ return newArr.length === 3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js
new file mode 100644
index 000000000..e0a5173a0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js",
+
+ description: "Array.prototype.filter applied to Function object, which implements its own property get method",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var fun = function (a, b) {
+ return a + b;
+ };
+ fun[0] = 12;
+ fun[1] = 11;
+ fun[2] = 9;
+
+ var newArr = Array.prototype.filter.call(fun, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js
new file mode 100644
index 000000000..f8ab2a943
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js",
+
+ description: "Array.prototype.filter - 'length' is own data property on an Array",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var newArr = [12, 11].filter(callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js
new file mode 100644
index 000000000..a0956ac39
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js
new file mode 100644
index 000000000..d0e492526
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js",
+
+ description: "Array.prototype.filter - 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var arrProtoLen;
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+ var newArr = [12, 11].filter(callbackfn);
+ return newArr.length === 2;
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js
new file mode 100644
index 000000000..edbcf6c80
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js",
+
+ description: "Array.prototype.filter to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js
new file mode 100644
index 000000000..9d69b390c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is an inherited data property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var proto = { length: 2 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js
new file mode 100644
index 000000000..258082958
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is an own accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ obj[0] = 12;
+ obj[1] = 11;
+ obj[2] = 9;
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js
new file mode 100644
index 000000000..95bb92502
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js
new file mode 100644
index 000000000..634a311b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js
@@ -0,0 +1,69 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js",
+
+ description: "Array.prototype.filter applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return obj.length === 2;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+ return newArr.length === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js
new file mode 100644
index 000000000..58d1aeaf3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js",
+
+ description: "Array.prototype.filter - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 0, 1: 1, length: undefined };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js
new file mode 100644
index 000000000..ebcbafe28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 9, length: NaN };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js
new file mode 100644
index 000000000..07e7f170d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js",
+
+ description: "Array.prototype.filter - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2" };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js
new file mode 100644
index 000000000..8e4527cb1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js",
+
+ description: "Array.prototype.filter - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: "-4294967294" };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js
new file mode 100644
index 000000000..81d68dc24
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js",
+
+ description: "Array.prototype.filter - 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2.5" };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js
new file mode 100644
index 000000000..31409b129
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js
@@ -0,0 +1,68 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js",
+
+ description: "Array.prototype.filter - 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var accessed1 = false;
+ var accessed2 = false;
+ var accessed3 = false;
+
+ function callbackfn1(val, idx, obj) {
+ accessed1 = true;
+ return true;
+ }
+
+ function callbackfn2(val, idx, obj) {
+ accessed2 = true;
+ return true;
+ }
+
+ function callbackfn3(val, idx, obj) {
+ accessed3 = true;
+ return true;
+ }
+
+ var obj1 = { 0: 9, length: "Infinity" };
+ var obj2 = { 0: 9, length: "-Infinity" };
+ var obj3 = { 0: 9, length: "+Infinity" };
+
+ var newArr1 = Array.prototype.filter.call(obj1, callbackfn1);
+ var newArr2 = Array.prototype.filter.call(obj2, callbackfn2);
+ var newArr3 = Array.prototype.filter.call(obj3, callbackfn3);
+
+ return !accessed1 && newArr1.length === 0 &&
+ !accessed2 && newArr2.length === 0 &&
+ !accessed3 && newArr3.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js
new file mode 100644
index 000000000..020ed5e2b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js",
+
+ description: "Array.prototype.filter - 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2E0" };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js
new file mode 100644
index 000000000..572a1b611
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js",
+
+ description: "Array.prototype.filter - 'length' is a string containing a hex number",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: "0x0002" };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js
new file mode 100644
index 000000000..a3d4d1085
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js",
+
+ description: "Array.prototype.filter - 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: "0002.00" };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js
new file mode 100644
index 000000000..d891bc53d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js",
+
+ description: "Array.prototype.filter - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 9, length: "asdf!_" };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return !accessed && newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js
new file mode 100644
index 000000000..ba4183b54
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js",
+
+ description: "Array.prototype.filter - value of 'length' is an Object which has an own toString method.",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ toString: function () {
+ return '2';
+ }
+ }
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js
new file mode 100644
index 000000000..2146013c5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js",
+
+ description: "Array.prototype.filter applied on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, 1: 9, length: true };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js
new file mode 100644
index 000000000..8b721cecc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js",
+
+ description: "Array.prototype.filter - value of 'length' is an Object which has an own valueOf method.",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ return 2;
+ }
+ }
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js
new file mode 100644
index 000000000..33add2d83
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js",
+
+ description: "Array.prototype.filter - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var firstStepOccured = false;
+ var secondStepOccured = false;
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ firstStepOccured = true;
+ return {};
+ },
+ toString: function () {
+ secondStepOccured = true;
+ return '2';
+ }
+ }
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11 && firstStepOccured && secondStepOccured;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js
new file mode 100644
index 000000000..b67f78f6a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js
@@ -0,0 +1,69 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js",
+
+ description: "Array.prototype.filter throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var firstStepOccured = false;
+ var secondStepOccured = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 12,
+
+ length: {
+ valueOf: function () {
+ firstStepOccured = true;
+ return {};
+ },
+ toString: function () {
+ secondStepOccured = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.filter.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && !accessed && firstStepOccured && secondStepOccured;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js
new file mode 100644
index 000000000..de84a00e7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js
@@ -0,0 +1,71 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js",
+
+ description: "Array.prototype.filter uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ child.toString = function () {
+ toStringAccessed = true;
+ return '1';
+ };
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: child
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11 && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js
new file mode 100644
index 000000000..096b3e9eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js",
+
+ description: "Array.prototype.filter - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: 2.685
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js
new file mode 100644
index 000000000..73edaa0ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js",
+
+ description: "Array.prototype.filter - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: -4294967294.5
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js
new file mode 100644
index 000000000..95aa4689e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js",
+
+ description: "Array.prototype.filter - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = {
+ 0: 12,
+ length: 4294967296
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return !accessed && newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js
new file mode 100644
index 000000000..9f8940619
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js",
+
+ description: "Array.prototype.filter - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: 4294967297
+ };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js
new file mode 100644
index 000000000..f3fcaae4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 11, length: 0 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js
new file mode 100644
index 000000000..4050cd66e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 11, length: +0 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js
new file mode 100644
index 000000000..75aecd130
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 11, length: -0 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js
new file mode 100644
index 000000000..dd124dac2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is positive)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: 2 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js
new file mode 100644
index 000000000..9cb69bda4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is negative)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 1: 11, 2: 9, length: -4294967294 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js
new file mode 100644
index 000000000..de114c7c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 9, length: Infinity };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js
new file mode 100644
index 000000000..cc743b5b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js",
+
+ description: "Array.prototype.filter - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = { 0: 9, length: -Infinity };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js
new file mode 100644
index 000000000..28717ed9a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js",
+
+description: "Array.prototype.filter throws TypeError if callbackfn is undefined",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.filter();
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js
new file mode 100644
index 000000000..0b061ac2c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js",
+
+ description: "Array.prototype.filter - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.filter.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js
new file mode 100644
index 000000000..1b99c9f4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js",
+
+ description: "Array.prototype.filter - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.filter.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js
new file mode 100644
index 000000000..c6f00aef1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-4-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js",
+
+ description: "Array.prototype.filter - 'callbackfn' is a function",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 1) {
+ return val === 9;
+ }
+ return false;
+ }
+
+ var newArr = [11, 9].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 9;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js
new file mode 100644
index 000000000..e2c533c73
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js",
+
+description: "Array.prototype.filter throws ReferenceError if callbackfn is unreferenced",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.filter(foo);
+ }
+ catch(e) {
+ if(e instanceof ReferenceError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js
new file mode 100644
index 000000000..ccfa7b503
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js",
+
+description: "Array.prototype.filter throws TypeError if callbackfn is null",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.filter(null);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js
new file mode 100644
index 000000000..4711f9e7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js",
+
+description: "Array.prototype.filter throws TypeError if callbackfn is boolean",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.filter(true);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js
new file mode 100644
index 000000000..d590aa28d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js",
+
+description: "Array.prototype.filter throws TypeError if callbackfn is number",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.filter(5);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js
new file mode 100644
index 000000000..e17627a1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js",
+
+description: "Array.prototype.filter throws TypeError if callbackfn is string",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.filter("abc");
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js
new file mode 100644
index 000000000..c7c878d4a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js",
+
+description: "Array.prototype.filter throws TypeError if callbackfn is Object without [[Call]] internal method",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.filter(new Object());
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js
new file mode 100644
index 000000000..da6904ba5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-4-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js",
+
+ description: "Array.prototype.filter - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.filter.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js
new file mode 100644
index 000000000..0c55aec41
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js",
+
+ description: "Array.prototype.filter - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.filter.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js
new file mode 100644
index 000000000..9ca420dd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.20-5-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js",
+
+ description: "Array.prototype.filter - thisArg not passed",
+
+ test: function testcase() {
+ this._15_4_4_17_5_1 = true;
+ var _15_4_4_17_5_1 = false;
+
+ function callbackfn(val, idx, obj) {
+ return this._15_4_4_17_5_1;
+ }
+ var srcArr = [1];
+ var resArr = srcArr.filter(callbackfn);
+ return resArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js
new file mode 100644
index 000000000..69291cbfe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js",
+
+ description: "Array.prototype.filter - Array Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objArray = new Array(10);
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objArray;
+ }
+
+
+ var newArr = [11].filter(callbackfn, objArray);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js
new file mode 100644
index 000000000..66c96e372
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js",
+
+ description: "Array.prototype.filter - String Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objString = new String();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objString;
+ }
+
+ var newArr = [11].filter(callbackfn, objString);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js
new file mode 100644
index 000000000..cc8833f32
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js",
+
+ description: "Array.prototype.filter - Boolean Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objBoolean = new Boolean();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objBoolean;
+ }
+
+ var newArr = [11].filter(callbackfn, objBoolean);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js
new file mode 100644
index 000000000..02d516ef7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js",
+
+ description: "Array.prototype.filter - Number Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objNumber = new Number();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objNumber;
+ }
+
+ var newArr = [11].filter(callbackfn, objNumber);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js
new file mode 100644
index 000000000..b9565fa49
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js",
+
+ description: "Array.prototype.filter - the Math object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === Math;
+ }
+
+ var newArr = [11].filter(callbackfn, Math);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js
new file mode 100644
index 000000000..c86ef78d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js",
+
+ description: "Array.prototype.filter - Date Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var objDate = new Date();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objDate;
+ }
+
+ var newArr = [11].filter(callbackfn, objDate);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js
new file mode 100644
index 000000000..73912fa2e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js",
+
+ description: "Array.prototype.filter - RegExp Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ var objRegExp = new RegExp();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objRegExp;
+ }
+
+ var newArr = [11].filter(callbackfn, objRegExp);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js
new file mode 100644
index 000000000..1c6a4f00f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js",
+
+ description: "Array.prototype.filter - the JSON object can be used as thisArg",
+
+ test: function testcase() {
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === JSON;
+ }
+
+ var newArr = [11].filter(callbackfn, JSON);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js
new file mode 100644
index 000000000..2cb650411
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js",
+
+ description: "Array.prototype.filter - Error Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objError = new RangeError();
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objError;
+ }
+
+ var newArr = [11].filter(callbackfn, objError);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js
new file mode 100644
index 000000000..a50dedaf9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js",
+
+ description: "Array.prototype.filter - the Arguments object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var arg;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === arg;
+ }
+
+ (function fun() {
+ arg = arguments;
+ }(1, 2, 3));
+
+ var newArr = [11].filter(callbackfn, arg);
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js
new file mode 100644
index 000000000..78656e771
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js",
+
+description: "Array.prototype.filter - thisArg is Object",
+
+test: function testcase() {
+ var res = false;
+ var o = new Object();
+ o.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var srcArr = [1];
+ var resArr = srcArr.filter(callbackfn,o);
+ if( resArr.length === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js
new file mode 100644
index 000000000..7cdca584c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js",
+
+ description: "Array.prototype.filter - boolean primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this.valueOf() === false;
+ }
+
+ var newArr = [11].filter(callbackfn, false);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js
new file mode 100644
index 000000000..da7ea3615
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js",
+
+ description: "Array.prototype.filter - number primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this.valueOf() === 101;
+ }
+
+ var newArr = [11].filter(callbackfn, 101);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js
new file mode 100644
index 000000000..e0fc72a38
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js",
+
+ description: "Array.prototype.filter - string primitive can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this.valueOf() === "abc";
+ }
+
+ var newArr = [11].filter(callbackfn, "abc");
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-25.js
new file mode 100644
index 000000000..e3bd18703
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-25.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-25.js",
+
+ description: "Array.prototype.filter - undefined can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var newArr = [11].filter(callbackfn, undefined);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-26.js
new file mode 100644
index 000000000..992c2d765
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-26.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-26.js",
+
+ description: "Array.prototype.filter - null can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var newArr = [11].filter(callbackfn, null);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js
new file mode 100644
index 000000000..632087e36
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js",
+
+ description: "Array.prototype.filter - Array.isArray(arg) returns true when arg is the returned array",
+
+ test: function testcase() {
+
+ var newArr = [11].filter(function () { });
+
+ return Array.isArray(newArr);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Array.isArray);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js
new file mode 100644
index 000000000..7418846b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js",
+
+ description: "Array.prototype.filter - the returned array is instanceof Array",
+
+ test: function testcase() {
+
+ var newArr = [11].filter(function () { });
+
+ return newArr instanceof Array;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js
new file mode 100644
index 000000000..2fbccb812
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js",
+
+ description: "Array.prototype.filter - returns an array whose length is 0",
+
+ test: function testcase() {
+
+ var newArr = [11].filter(function () { });
+
+ return newArr.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js
new file mode 100644
index 000000000..af94bee1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js",
+
+description: "Array.prototype.filter - thisArg is Array",
+
+test: function testcase() {
+ var res = false;
+ var a = new Array();
+ a.res = true;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ var srcArr = [1];
+ var resArr = srcArr.filter(callbackfn,a);
+ if( resArr.length === 1)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js
new file mode 100644
index 000000000..ccb775417
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js",
+
+description: "Array.prototype.filter - thisArg is object from object template(prototype)",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.prototype.res = true;
+ var f = new foo();
+
+ var srcArr = [1];
+ var resArr = srcArr.filter(callbackfn,f);
+ if( resArr.length === 1)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js
new file mode 100644
index 000000000..3c2641571
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js",
+
+description: "Array.prototype.filter - thisArg is object from object template",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ var f = new foo();
+ f.res = true;
+
+ var srcArr = [1];
+ var resArr = srcArr.filter(callbackfn,f);
+ if( resArr.length === 1)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js
new file mode 100644
index 000000000..5b68bf3f9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-5-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js",
+
+description: "Array.prototype.filter - thisArg is function",
+
+test: function testcase() {
+ var res = false;
+ function callbackfn(val, idx, obj)
+ {
+ return this.res;
+ }
+
+ function foo(){}
+ foo.res = true;
+
+ var srcArr = [1];
+ var resArr = srcArr.filter(callbackfn,foo);
+ if( resArr.length === 1)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js
new file mode 100644
index 000000000..9e73946f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js",
+
+ description: "Array.prototype.filter - built-in functions can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === eval;
+ }
+
+ var newArr = [11].filter(callbackfn, eval);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js
new file mode 100644
index 000000000..176a97924
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js",
+
+ description: "Array.prototype.filter - Function Object can be used as thisArg",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objFunction = function () { };
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return this === objFunction;
+ }
+
+ var newArr = [11].filter(callbackfn, objFunction);
+
+ return newArr[0] === 11 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js
new file mode 100644
index 000000000..92dbd2753
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (empty array)",
+
+test: function testcase() {
+ function cb(){}
+ var a = [].filter(cb);
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js
new file mode 100644
index 000000000..f6600fe28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ function cb(){}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js
new file mode 100644
index 000000000..48348aedb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ function cb(){}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js
new file mode 100644
index 000000000..fd9c04904
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ function cb(){}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js
new file mode 100644
index 000000000..360661f95
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ function cb(){}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js
new file mode 100644
index 000000000..33a84520b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ function cb(){}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js
new file mode 100644
index 000000000..47c160c3a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ function cb(){}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js
new file mode 100644
index 000000000..ca77c27f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-6-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js",
+
+description: "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with []",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ var a = f.filter(cb);
+
+ if (Array.isArray(a) &&
+ a.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js
new file mode 100644
index 000000000..dfff35512
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.20-9-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js",
+
+ description: "Array.prototype.filter doesn't consider new elements added to array after it is called",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ srcArr[2] = 3;
+ srcArr[5] = 6;
+ return true;
+ }
+
+ var srcArr = [1, 2, , 4, 5];
+ var resArr = srcArr.filter(callbackfn);
+ return resArr.length === 5;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js
new file mode 100644
index 000000000..de334c0f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js",
+
+description: "Array.prototype.filter considers new value of elements in array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ srcArr[2] = -1;
+ srcArr[4] = -1;
+ if(val > 0)
+ return true;
+ else
+ return false;
+ }
+
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.filter(callbackfn);
+ if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js
new file mode 100644
index 000000000..052ed516c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js",
+
+description: "Array.prototype.filter doesn't visit deleted elements in array after the call",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ delete srcArr[2];
+ delete srcArr[4];
+ if(val > 0)
+ return true;
+ else
+ return false;
+ }
+
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.filter(callbackfn);
+ if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4 ) // two elements deleted
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js
new file mode 100644
index 000000000..a737145d9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js",
+
+description: "Array.prototype.filter doesn't visit deleted elements when Array.length is decreased",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ srcArr.length = 2;
+ return true;
+ }
+
+ var srcArr = [1,2,3,4,6];
+ var resArr = srcArr.filter(callbackfn);
+ if(resArr.length === 2 )
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js
new file mode 100644
index 000000000..352f9c876
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js",
+
+description: "Array.prototype.filter doesn't consider newly added elements in sparse array",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ srcArr[1000] = 3;
+ return true;
+ }
+
+ var srcArr = new Array(10);
+ srcArr[1] = 1;
+ srcArr[2] = 2;
+ var resArr = srcArr.filter(callbackfn);
+ if( resArr.length === 2)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js
new file mode 100644
index 000000000..c321d6829
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js",
+
+description: "Array.prototype.filter visits deleted element in array after the call when same index is also present in prototype",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj)
+ {
+ delete srcArr[2];
+ delete srcArr[4];
+ if(val > 0)
+ return true;
+ else
+ return false;
+ }
+
+ Array.prototype[4] = 5;
+ var srcArr = [1,2,3,4,5];
+ var resArr = srcArr.filter(callbackfn);
+ delete Array.prototype[4];
+ if(resArr.length === 4 && resArr[0] === 1 && resArr[3] == 5) // only one element deleted
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js
new file mode 100644
index 000000000..c1b3fb4be
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.20-9-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js",
+
+ description: "Array.prototype.filter stops calling callbackfn once the array is deleted during the call",
+
+ test: function testcase() {
+ var o = new Object();
+ o.srcArr = [1, 2, 3, 4, 5];
+
+ function callbackfn(val, idx, obj) {
+ delete o.srcArr;
+ if (val > 0)
+ return true;
+ else
+ return false;
+ }
+
+ var resArr = o.srcArr.filter(callbackfn);
+ return resArr.length === 5 && typeof o.srcArr === "undefined";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js
new file mode 100644
index 000000000..affc69237
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-b-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js",
+
+description: "Array.prototype.filter - callbackfn not called for indexes never been assigned values",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(val, idx, obj)
+ {
+ callCnt++;
+ return false;
+ }
+
+ var srcArr = new Array(10);
+ srcArr[1] = undefined; //explicitly assigning a value
+ var resArr = srcArr.filter(callbackfn);
+ if( resArr.length === 0 && callCnt === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js
new file mode 100644
index 000000000..425ad6eee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-b-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js",
+
+ description: "Array.prototype.filter - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ obj[2] = "length";
+ return 3;
+ },
+ configurable: true
+ });
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === "length";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js
new file mode 100644
index 000000000..1d6c46144
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-b-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js",
+
+ description: "Array.prototype.filter - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+ var obj = { 2: 6.99, 8: 19 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ delete obj[2];
+ return 10;
+ },
+ configurable: true
+ });
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] !== 6.99;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js
new file mode 100644
index 000000000..c8ee028f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js",
+
+ description: "Array.prototype.filter - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = {};
+ function callbackfn(val, idx, obj) {
+ return (idx === 5) && (val === kValue);
+ }
+
+ var obj = { 5: kValue, length: 100 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === kValue;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js
new file mode 100644
index 000000000..a7226bd08
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js",
+
+ description: "Array.prototype.filter - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 11;
+ }
+ }
+
+ var newArr = [11].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js
new file mode 100644
index 000000000..e7e7f4815
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js",
+
+ description: "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+ function callbackfn(val, idx, obj) {
+ return val === 11 && idx === 0;
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.filter.call(arguments, callbackfn);
+ };
+
+ var newArr = func(11);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js
new file mode 100644
index 000000000..eb4fdf6f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js",
+
+ description: "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 11;
+ } else if (idx === 1) {
+ return val === 9;
+ } else {
+ return false;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.filter.call(arguments, callbackfn);
+ };
+ var newArr = func(11, 9);
+
+ return newArr.length === 2 && newArr[0] === 11 &&
+ newArr[1] === 9;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js
new file mode 100644
index 000000000..ae67db6e0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js",
+
+ description: "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 11;
+ } else if (idx === 1) {
+ return val === 12;
+ } else if (idx === 2) {
+ return val === 9;
+ } else {
+ return false;
+ }
+ }
+
+ var func = function (a, b) {
+ return Array.prototype.filter.call(arguments, callbackfn);
+ };
+ var newArr = func(11, 12, 9);
+
+ return newArr.length === 3 && newArr[0] === 11 &&
+ newArr[1] === 12 && newArr[2] === 9;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js
new file mode 100644
index 000000000..a81bb26f2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js",
+
+ description: "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return (idx === 5) && (val === "abc");
+ }
+
+ var proto = { 0: 11, 5: 100 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[5] = "abc";
+ child.length = 10;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === "abc";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js
new file mode 100644
index 000000000..0d28d5499
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js",
+
+ description: "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return (idx === 0) && (val === 12);
+ }
+
+ try {
+ Array.prototype[0] = 11;
+ var newArr = [12].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 12;
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js
new file mode 100644
index 000000000..1557db561
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js",
+
+ description: "Array.prototype.filter - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var kValue = 'abc';
+
+ function callbackfn(val, idx, obj) {
+ return (idx === 5) && (val === kValue);
+ }
+
+ var proto = { 5: kValue };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 10;
+
+ var newArr = Array.prototype.filter.call(child, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === kValue;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js
new file mode 100644
index 000000000..3da285739
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js",
+
+ description: "Array.prototype.filter - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return (idx === 1) && (val === 13);
+ }
+
+ try {
+ Array.prototype[1] = 13;
+ var newArr = [, , , ].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 13;
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js
new file mode 100644
index 000000000..8760cc737
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-c-ii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js",
+
+description: "Array.prototype.filter - callbackfn called with correct parameters",
+
+test: function testcase() {
+
+ var bPar = true;
+ var bCalled = false;
+ function callbackfn(val, idx, obj)
+ {
+ bCalled = true;
+ if(obj[idx] !== val)
+ bPar = false;
+ }
+
+ var srcArr = [0,1,true,null,new Object(),"five"];
+ srcArr[999999] = -6.6;
+ var resArr = srcArr.filter(callbackfn);
+
+ if(bCalled === true && bPar === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js
new file mode 100644
index 000000000..9e9d1896d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js",
+
+ description: "Array.prototype.filter - callbackfn is called with 1 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn(val) {
+ return val > 10;
+ }
+ var newArr = [12].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js
new file mode 100644
index 000000000..2ce09d5c0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js",
+
+ description: "Array.prototype.filter - callbackfn is called with 2 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx) {
+ return val > 10 && arguments[2][idx] === val;
+ }
+ var newArr = [11].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js
new file mode 100644
index 000000000..9887e4b93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js",
+
+ description: "Array.prototype.filter - callbackfn is called with 3 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return val > 10 && obj[idx] === val;
+ }
+ var newArr = [11].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js
new file mode 100644
index 000000000..b6e05821b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js",
+
+ description: "Array.prototype.filter - callbackfn that uses arguments object to get parameter value",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return arguments[2][arguments[1]] === arguments[0];
+ }
+ var newArr = [11].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-14.js
new file mode 100644
index 000000000..c1673ba99
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-14.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-14.js",
+
+ description: "Array.prototype.filter - 'this' of 'callbackfn' is an object when 'T' is not an object('T' is undefined)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, o) {
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var obj = { 0: 11, length: 1 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn, undefined);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-15.js
new file mode 100644
index 000000000..f1e868969
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-15.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-15.js",
+
+ description: "Array.prototype.filter - 'this' of 'callbackfn' is an object when 'T' is not an object(T is null)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, o) {
+ return 'document' in this &&
+ 'open' in this &&
+ 'frames' in this;
+ }
+
+ var newArr = [11].filter(callbackfn, null);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js
new file mode 100644
index 000000000..40e4f1ee8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js",
+
+ description: "Array.prototype.filter - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return this.valueOf() === false;
+ }
+
+ var obj = { 0: 11, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn, false);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js
new file mode 100644
index 000000000..18d3289cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js",
+
+ description: "Array.prototype.filter -'this' of 'callbackfn' is a Number object when T is not an object (T is a number)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, o) {
+ return 5 === this.valueOf();
+ }
+
+ var obj = { 0: 11, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn, 5);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js
new file mode 100644
index 000000000..cd8794c4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js",
+
+ description: "Array.prototype.filter - 'this' of 'callbackfn' is an String object when T is not an object (T is a string)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 'hello' === this.valueOf();
+ }
+
+ var obj = { 0: 11, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn, "hello");
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js
new file mode 100644
index 000000000..1af74705b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js",
+
+ description: "Array.prototype.filter - non-indexed properties are not called",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return val === 8;
+ }
+
+ var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js
new file mode 100644
index 000000000..cc4894f6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-c-ii-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js",
+
+description: "Array.prototype.filter - callbackfn takes 3 arguments",
+
+test: function testcase() {
+
+ var parCnt = 3;
+ var bCalled = false
+ function callbackfn(val, idx, obj)
+ {
+ bCalled = true;
+ if(arguments.length !== 3)
+ parCnt = arguments.length; //verify if callbackfn was called with 3 parameters
+ }
+
+ var srcArr = [0,1,2,3,4,5,6,7,8,9];
+ var resArr = srcArr.filter(callbackfn);
+ if(bCalled === true && parCnt === 3)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js
new file mode 100644
index 000000000..2e4a4827d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js",
+
+ description: "Array.prototype.filter - callbackfn called with correct parameters (thisArg is correct)",
+
+ test: function testcase() {
+
+ var thisArg = { threshold: 10 };
+
+ function callbackfn(val, idx, obj) {
+ return this === thisArg;
+ }
+
+ var obj = { 0: 11, length: 1 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js
new file mode 100644
index 000000000..4b6c2d93e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js",
+
+ description: "Array.prototype.filter - callbackfn called with correct parameters (kValue is correct)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (idx === 0) {
+ return val === 11;
+ }
+
+ if (idx === 1) {
+ return val === 12;
+ }
+
+ return false;
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js
new file mode 100644
index 000000000..1b092c987
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js",
+
+ description: "Array.prototype.filter - callbackfn called with correct parameters (the index k is correct)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ if (val === 11) {
+ return idx === 0;
+ }
+
+ if (val === 12) {
+ return idx === 1;
+ }
+
+ return false;
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js
new file mode 100644
index 000000000..75aaed665
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js",
+
+ description: "Array.prototype.filter - callbackfn called with correct parameters (this object O is correct)",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ return obj === o;
+ }
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js
new file mode 100644
index 000000000..2a51e13dd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js",
+
+ description: "Array.prototype.filter - k values are passed in ascending numeric order",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2, 3, 4, 5];
+ var lastIdx = 0;
+ var called = 0;
+ function callbackfn(val, idx, o) {
+ called++;
+ if (lastIdx !== idx) {
+ return false;
+ } else {
+ lastIdx++;
+ return true;
+ }
+ }
+ var newArr = arr.filter(callbackfn);
+
+ return newArr.length === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js
new file mode 100644
index 000000000..87d589cae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js",
+
+ description: "Array.prototype.filter - k values are accessed during each iteration and not prior to starting the loop on an Array",
+
+ test: function testcase() {
+
+ var kIndex = [];
+ var called = 0;
+
+ //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(val, idx, obj) {
+ called++;
+ //Each position should be visited one time, which means k is accessed one time during iterations.
+ if (kIndex[idx] === undefined) {
+ //when current position is visited, its previous index should has been visited.
+ if (idx !== 0 && kIndex[idx - 1] === undefined) {
+ return true;
+ }
+ kIndex[idx] = 1;
+ return false;
+ } else {
+ return true;
+ }
+ }
+ var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);
+
+ return newArr.length === 0 && called === 4;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js
new file mode 100644
index 000000000..f458cdc96
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js",
+
+ description: "Array.prototype.filter - arguments to callbackfn are self consistent",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, length: 1 };
+ var thisArg = {};
+
+ function callbackfn() {
+ return this === thisArg &&
+ arguments[0] === 11 &&
+ arguments[1] === 0 &&
+ arguments[2] === obj;
+ }
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js
new file mode 100644
index 000000000..fda6e4e76
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js",
+
+ description: "Array.prototype.filter - unhandled exceptions happened in callbackfn terminate iteration",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (called === 1) {
+ throw new Error("Exception occurred in callbackfn");
+ }
+ return true;
+ }
+
+ var obj = { 0: 11, 4: 10, 10: 8, length: 20 };
+
+ try {
+ Array.prototype.filter.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return 1 === called && ex instanceof Error;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js
new file mode 100644
index 000000000..1b5ec8af7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js",
+
+ description: "Array.prototype.filter - element changed by callbackfn on previous iterations is observed",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ function callbackfn(val, idx, o) {
+ if (idx === 0) {
+ obj[idx + 1] = 8;
+ }
+ return val > 10;
+ }
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js
new file mode 100644
index 000000000..d28bf7e6c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js",
+
+ description: "Array.prototype.filter - callbackfn is called with 0 formal parameter",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return true;
+ }
+ var newArr = [11].filter(callbackfn);
+
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js
new file mode 100644
index 000000000..34bc96084
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js",
+
+ description: "Array.prototype.filter - value of returned array element equals to 'kValue'",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ return newArr[0] === obj[0] && newArr[1] === obj[1];
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js
new file mode 100644
index 000000000..a7657c49e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js",
+
+ description: "Array.prototype.filter - value of returned array element can be overwritten",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ try {
+ var tempVal = newArr[1];
+ newArr[1] += 1;
+ return newArr[1] !== tempVal;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js
new file mode 100644
index 000000000..bdf177b19
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js",
+
+ description: "Array.prototype.filter - value of returned array element can be enumerated",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ var prop;
+ var enumerable = false;
+ for (prop in newArr) {
+ if (newArr.hasOwnProperty(prop)) {
+ if (prop === "0") {
+ enumerable = true;
+ }
+ }
+ }
+
+ return enumerable;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js
new file mode 100644
index 000000000..f6b518798
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js",
+
+ description: "Array.prototype.filter - value of returned array element can be changed or deleted",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+
+ try {
+ var tempVal = newArr[1];
+ delete newArr[1];
+ return tempVal !== undefined && newArr[1] === undefined;
+ } catch (ex) {
+ return false;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js
new file mode 100644
index 000000000..5dfedd9ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js",
+
+ description: "Array.prototype.filter - values of 'to' are passed in acending numeric order",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2, 3, 4];
+ var lastToIdx = 0;
+ var called = 0;
+ function callbackfn(val, idx, obj) {
+ called++;
+ if (lastToIdx !== idx) {
+ return false;
+ } else {
+ lastToIdx++;
+ return true;
+ }
+ }
+ var newArr = arr.filter(callbackfn);
+
+ return newArr.length === 5 && called === 5;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js
new file mode 100644
index 000000000..b25055889
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js",
+
+ description: "Array.prototype.filter - values of 'to' are accessed during each iteration when 'selected' is converted to true and not prior to starting the loop",
+
+ test: function testcase() {
+
+ var toIndex = [];
+ var called = 0;
+
+ //By below way, we could verify that 'to' would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(val, idx, obj) {
+ called++;
+ //Each position should be visited one time, which means 'to' is accessed one time during iterations.
+ if (toIndex[idx] === undefined) {
+ //when current position is visited, its previous index should has been visited.
+ if (idx !== 0 && toIndex[idx - 1] === undefined) {
+ return false;
+ }
+ toIndex[idx] = 1;
+ return true;
+ } else {
+ return false;
+ }
+ }
+ var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);
+
+ return newArr.length === 4 && called === 4;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js
new file mode 100644
index 000000000..19b4e259f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.20-9-c-iii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js",
+
+description: "Array.prototype.filter - getOwnPropertyDescriptor(all true) of returned array element",
+
+test: function testcase() {
+
+ function callbackfn(val, idx, obj){
+ if(val % 2)
+ return true;
+ else
+ return false;
+ }
+ var srcArr = [0,1,2,3,4];
+ var resArr = srcArr.filter(callbackfn);
+ if (resArr.length > 0){
+ var desc = Object.getOwnPropertyDescriptor(resArr, 1)
+ if(desc.value === 3 && //srcArr[1] = true
+ desc.writable === true &&
+ desc.enumerable === true &&
+ desc.configurable === true){
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js
new file mode 100644
index 000000000..050d5b839
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a number (value is negative number)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return -5;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js
new file mode 100644
index 000000000..81bc08c3f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return Infinity;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js
new file mode 100644
index 000000000..ff2295c8d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return -Infinity;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js
new file mode 100644
index 000000000..3ced0ecc2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return NaN;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js
new file mode 100644
index 000000000..71558a5aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js",
+
+ description: "Array.prototype.filter return value of callbackfn is an empty string",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return "";
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js
new file mode 100644
index 000000000..0740ed968
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a non-empty string",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return "non-empty string";
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js
new file mode 100644
index 000000000..fe4891d48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a Function object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return function () { };
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js
new file mode 100644
index 000000000..d4c2f6a93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js",
+
+ description: "Array.prototype.filter return value of callbackfn is an Array object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Array(10);
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js
new file mode 100644
index 000000000..80ad3fcf1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a String object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new String();
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js
new file mode 100644
index 000000000..3f05d206e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js",
+
+ description: "Array.prototype.filter return value of callbackfn is a Boolean object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Boolean();
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js
new file mode 100644
index 000000000..56ed867a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, o) {
+ accessed = true;
+ return undefined;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js
new file mode 100644
index 000000000..3219c2d85
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a Number object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Number();
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js
new file mode 100644
index 000000000..14e437593
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is the Math object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return Math;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js
new file mode 100644
index 000000000..869df1d0f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a Date object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Date();
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js
new file mode 100644
index 000000000..dc26b0c59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a RegExp object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new RegExp();
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js
new file mode 100644
index 000000000..6b118a500
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is the JSON object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return JSON;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js
new file mode 100644
index 000000000..21435b586
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is an Error object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new EvalError();
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js
new file mode 100644
index 000000000..cb177b099
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is the Arguments object",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return arguments;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js
new file mode 100644
index 000000000..2d93a4171
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js",
+
+ description: "Array.prototype.filter - false prevents element added to output Array",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(val, idx, obj) {
+ called++;
+ return val > 10;
+ }
+
+ var obj = { 0: 11, 1: 8, length: 20 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 1 && newArr[0] !== 8 && called === 2;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js
new file mode 100644
index 000000000..147b353e8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is null",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return null;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js
new file mode 100644
index 000000000..d42514691
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-30",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js",
+
+ description: "Array.prototype.filter - return value (new Boolean(false)) of callbackfn is treated as true value",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return new Boolean(false);
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js
new file mode 100644
index 000000000..2d481291a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a boolean (value is false)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return false;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js
new file mode 100644
index 000000000..354e391d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a boolean (value is true)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return true;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ var newArr = Array.prototype.filter.call(obj, callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js
new file mode 100644
index 000000000..f356af700
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return 0;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js
new file mode 100644
index 000000000..897699ee5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return +0;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js
new file mode 100644
index 000000000..be3b51ff8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a nunmber (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(val, idx, obj) {
+ accessed = true;
+ return -0;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 0 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js
new file mode 100644
index 000000000..94df6be2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.20-9-c-iii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js",
+
+ description: "Array.prototype.filter - return value of callbackfn is a number (value is positive number)",
+
+ test: function testcase() {
+
+ function callbackfn(val, idx, obj) {
+ return 5;
+ }
+
+ var newArr = [11].filter(callbackfn);
+ return newArr.length === 1 && newArr[0] === 11;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.filter);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js
new file mode 100644
index 000000000..fb19acb43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js",
+
+description: "Array.prototype.reduce must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.reduce;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js
new file mode 100644
index 000000000..9cb0ae364
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js",
+
+description: "Array.prototype.reduce.length must be 1",
+
+test: function testcase() {
+ if (Array.prototype.reduce.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js
new file mode 100644
index 000000000..e3f3c8bf6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js",
+
+ description: "Array.prototype.reduce applied to undefined",
+
+ test: function testcase() {
+ try {
+ Array.prototype.reduce.call(undefined);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js
new file mode 100644
index 000000000..f0511d952
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js",
+
+ description: "Array.prototype.reduce applied to the Math object",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return ('[object Math]' === Object.prototype.toString.call(obj));
+ }
+
+ try {
+ Math.length = 1;
+ Math[0] = 1;
+ return Array.prototype.reduce.call(Math, callbackfn, 1);
+ } finally {
+ delete Math[0];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js
new file mode 100644
index 000000000..81bbc11bd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js",
+
+ description: "Array.prototype.reduce applied to Date object",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof Date;
+ }
+
+ var obj = new Date();
+ obj.length = 1;
+ obj[0] = 1;
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js
new file mode 100644
index 000000000..1c0903863
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js",
+
+ description: "Array.prototype.reduce applied to RegExp object",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof RegExp;
+ }
+
+ var obj = new RegExp();
+ obj.length = 1;
+ obj[0] = 1;
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js
new file mode 100644
index 000000000..cd0f3fa33
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js",
+
+ description: "Array.prototype.reduce applied to the JSON object",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return ('[object JSON]' === Object.prototype.toString.call(obj));
+ }
+
+ try {
+ JSON.length = 1;
+ JSON[0] = 1;
+ return Array.prototype.reduce.call(JSON, callbackfn, 1);
+ } finally {
+ delete JSON.length;
+ delete JSON[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js
new file mode 100644
index 000000000..9e3f160dc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js",
+
+ description: "Array.prototype.reduce applied to Error object",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof Error;
+ }
+
+ var obj = new Error();
+ obj.length = 1;
+ obj[0] = 1;
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js
new file mode 100644
index 000000000..5fcaa4d20
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js",
+
+ description: "Array.prototype.reduce applied to the Arguments object",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return ('[object Arguments]' === Object.prototype.toString.call(obj));
+ }
+
+ var obj = (function () {
+ return arguments;
+ }("a", "b"));
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js
new file mode 100644
index 000000000..c5686281b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js",
+
+ description: "Array.prototype.reduce applied to null",
+
+ test: function testcase() {
+ try {
+ Array.prototype.reduce.call(null);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js
new file mode 100644
index 000000000..7c6038d54
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js",
+
+ description: "Array.prototype.reduce applied to boolean primitive",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ try {
+ Boolean.prototype[0] = true;
+ Boolean.prototype.length = 1;
+
+ return Array.prototype.reduce.call(false, callbackfn, 1);
+
+ } finally {
+ delete Boolean.prototype[0];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js
new file mode 100644
index 000000000..02f8819af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js",
+
+ description: "Array.prototype.reduce applied to Boolean object",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof Boolean;
+ }
+
+ var obj = new Boolean(true);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js
new file mode 100644
index 000000000..b4a907fc0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js",
+
+ description: "Array.prototype.reduce applied to number primitive",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ try {
+ Number.prototype[0] = 1;
+ Number.prototype.length = 1;
+
+ return Array.prototype.reduce.call(2.5, callbackfn, 1);
+ } finally {
+ delete Number.prototype[0];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js
new file mode 100644
index 000000000..aa8c8c2bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js",
+
+ description: "Array.prototype.reduce applied to Number object",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof Number;
+ }
+
+ var obj = new Number(-128);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js
new file mode 100644
index 000000000..05a9e2284
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js",
+
+ description: "Array.prototype.reduce applied to string primitive",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof String;
+ }
+
+ return Array.prototype.reduce.call("abc", callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js
new file mode 100644
index 000000000..c9646a7b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js",
+
+ description: "Array.prototype.reduce applied to String object",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof String;
+ }
+
+ var obj = new String("abc");
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js
new file mode 100644
index 000000000..5f3218586
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js",
+
+ description: "Array.prototype.reduce applied to Function object",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return obj instanceof Function;
+ }
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[0] = 11;
+ obj[1] = 9;
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js
new file mode 100644
index 000000000..7c3140574
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js",
+
+description: "Array.prototype.reduce doesn't mutate the Array on which it is called on",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ return 1;
+ }
+ var srcArr = [1,2,3,4,5];
+ srcArr.reduce(callbackfn);
+ if(srcArr[0] === 1 &&
+ srcArr[1] === 2 &&
+ srcArr[2] === 3 &&
+ srcArr[3] === 4 &&
+ srcArr[4] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js
new file mode 100644
index 000000000..5a233c527
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js",
+
+description: "Array.prototype.reduce reduces the array in ascending order of indices",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ return prevVal + curVal;
+ }
+ var srcArr = ['1','2','3','4','5'];
+ if(srcArr.reduce(callbackfn) === '12345')
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js
new file mode 100644
index 000000000..77173b896
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js",
+
+description: "Array.prototype.reduce - subclassed array of length 1",
+
+test: function testcase() {
+ foo.prototype = [1];
+ function foo() {}
+ var f = new foo();
+
+ function cb(){}
+ if(f.reduce(cb) === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js
new file mode 100644
index 000000000..18412c57c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js",
+
+description: "Array.prototype.reduce - subclassed array with length more than 1",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3, 4);
+ function foo() {}
+ var f = new foo();
+
+ function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
+ if(f.reduce(cb) === 10)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js
new file mode 100644
index 000000000..c0345f9e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js",
+
+description: "Array.prototype.reduce reduces the array in ascending order of indices(initialvalue present)",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ return prevVal + curVal;
+ }
+ var srcArr = ['1','2','3','4','5'];
+ if(srcArr.reduce(callbackfn,'0') === '012345')
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js
new file mode 100644
index 000000000..ee1b67ba6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js",
+
+description: "Array.prototype.reduce - subclassed array when initialvalue provided",
+
+test: function testcase() {
+ foo.prototype = [1,2,3,4];
+ function foo() {}
+ var f = new foo();
+
+ function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
+ if(f.reduce(cb,-1) === 9)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js
new file mode 100644
index 000000000..b22276e49
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js",
+
+description: "Array.prototype.reduce - subclassed array with length 1 and initialvalue provided",
+
+test: function testcase() {
+ foo.prototype = [1];
+ function foo() {}
+ var f = new foo();
+
+ function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
+ if(f.reduce(cb,-1) === 0)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js
new file mode 100644
index 000000000..589cb6d02
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-10-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js",
+
+description: "Array.prototype.reduce doesn't visit expandos",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ callCnt++;
+ return curVal;
+ }
+ var srcArr = ['1','2','3','4','5'];
+ srcArr["i"] = 10;
+ srcArr[true] = 11;
+ srcArr.reduce(callbackfn);
+
+ if(callCnt == 4)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js
new file mode 100644
index 000000000..2d3c67c62
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js",
+
+ description: "Array.prototype.reduce - 'length' is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: 2
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js
new file mode 100644
index 000000000..bc3a5da4b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js",
+
+ description: "Array.prototype.reduce applied to Array-like object, 'length' is an inherited accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduce.call(child, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js
new file mode 100644
index 000000000..12ccda2f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js",
+
+ description: "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12
+ };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js
new file mode 100644
index 000000000..6aa7553bf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js",
+
+ description: "Array.prototype.reduce - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var obj = { 0: 12, 1: 11 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ } finally {
+ delete Object.prototype.length;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js
new file mode 100644
index 000000000..f8e850312
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js",
+
+ description: "Array.prototype.reduce applied to Array-like object that 'length' is inherited accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 11;
+ child[1] = 12;
+
+ return Array.prototype.reduce.call(child, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js
new file mode 100644
index 000000000..e857eb6a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js",
+
+ description: "Array.prototype.reduce applied to the Array-like object that 'length' property doesn't exist",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js
new file mode 100644
index 000000000..1f9cc0199
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js",
+
+ description: "Array.prototype.reduce applied to the Arguments object, which implements its own property get method",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var func = function (a, b) {
+ arguments[2] = 9;
+ return Array.prototype.reduce.call(arguments, callbackfn, 1);
+ };
+
+ return func(12, 11) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js
new file mode 100644
index 000000000..8d740f90d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js",
+
+ description: "Array.prototype.reduce applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 3);
+ }
+
+ var str = new String("012");
+
+ return Array.prototype.reduce.call(str, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js
new file mode 100644
index 000000000..83c4549b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js",
+
+ description: "Array.prototype.reduce applied to Function object, which implements its own property get method",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var fun = function (a, b) {
+ return a + b;
+ };
+ fun[0] = 12;
+ fun[1] = 11;
+ fun[2] = 9;
+
+ return Array.prototype.reduce.call(fun, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js
new file mode 100644
index 000000000..10ffb32f8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js",
+
+ description: "Array.prototype.reduce - 'length' is own data property on an Array",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ return [12, 11].reduce(callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js
new file mode 100644
index 000000000..7db7e92a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js",
+
+ description: "Array.prototype.reduce - 'length' is an own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduce.call(child, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js
new file mode 100644
index 000000000..4fc4386f4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js",
+
+ description: "Array.prototype.reduce - 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+ var storeProtoLength;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ try {
+ storeProtoLength = Array.prototype.length;
+ Array.prototype.length = 0;
+
+ return [12, 11].reduce(callbackfn, 1) === true;
+ } finally {
+ Array.prototype.length = storeProtoLength;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js
new file mode 100644
index 000000000..ab9fa80bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js",
+
+ description: "Array.prototype.reduce applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduce.call(child, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js
new file mode 100644
index 000000000..ed15ee56d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js",
+
+ description: "Array.prototype.reduce applied to Array-like object, 'length' is an inherited data property",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var proto = { length: 2 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduce.call(child, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js
new file mode 100644
index 000000000..2a2a0fc72
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js",
+
+ description: "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ obj[0] = 12;
+ obj[1] = 11;
+ obj[2] = 9;
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js
new file mode 100644
index 000000000..56c0ee727
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js",
+
+ description: "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduce.call(child, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js
new file mode 100644
index 000000000..9fac26fb5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js
@@ -0,0 +1,69 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js",
+
+ description: "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (obj.length === 2);
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduce.call(child, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js
new file mode 100644
index 000000000..674e94b8b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js",
+
+ description: "Array.prototype.reduce - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = { 0: 0, 1: 1, length: undefined };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js
new file mode 100644
index 000000000..a878d5479
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js",
+
+ description: "Array.prototype.reduce - value of 'length' is number primitive (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = { 0: 9, length: NaN };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js
new file mode 100644
index 000000000..ec4dac4bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js",
+
+ description: "Array.prototype.reduce - 'length' is a string containing a positive number",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2" };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js
new file mode 100644
index 000000000..f576a3981
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js",
+
+ description: "Array.prototype.reduce - 'length' is a string containing a negative number",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "-4294967294" };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js
new file mode 100644
index 000000000..85303d077
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js",
+
+ description: "Array.prototype.reduce - 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2.5" };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js
new file mode 100644
index 000000000..c18ab3f94
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js",
+
+ description: "Array.prototype.reduce - 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var accessed1 = false;
+ var accessed2 = false;
+ var accessed3 = false;
+
+ function callbackfn1(prevVal, curVal, idx, obj) {
+ accessed1 = true;
+ return 2;
+ }
+
+ function callbackfn2(prevVal, curVal, idx, obj) {
+ accessed2 = true;
+ return 2;
+ }
+
+ function callbackfn3(prevVal, curVal, idx, obj) {
+ accessed3 = true;
+ return 2;
+ }
+
+ var obj1 = { 0: 9, length: "Infinity" };
+ var obj2 = { 0: 9, length: "-Infinity" };
+ var obj3 = { 0: 9, length: "+Infinity" };
+
+ return Array.prototype.reduce.call(obj1, callbackfn1, 1) === 1 &&
+ Array.prototype.reduce.call(obj2, callbackfn2, 1) === 1 &&
+ Array.prototype.reduce.call(obj3, callbackfn3, 1) === 1 &&
+ !accessed1 && !accessed2 && !accessed3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js
new file mode 100644
index 000000000..ad30b2604
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js",
+
+ description: "Array.prototype.reduce - 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "2E0" };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js
new file mode 100644
index 000000000..dfe49a7cd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js",
+
+ description: "Array.prototype.reduce - 'length' is a string containing a hex number",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "0x0002" };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js
new file mode 100644
index 000000000..104b3265f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js",
+
+ description: "Array.prototype.reduce - 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: "0002.00" };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js
new file mode 100644
index 000000000..1fc0fed40
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = { 0: 9, length: "asdf!_" };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js
new file mode 100644
index 000000000..170e81c6e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js",
+
+ description: "Array.prototype.reduce - value of 'length' is an Object which has an own toString method",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ toString: function () {
+ return '2';
+ }
+ }
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js
new file mode 100644
index 000000000..b65057233
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a boolean (value is true)",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 0);
+ }
+
+ var obj = { 0: 11, 1: 9, length: true };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js
new file mode 100644
index 000000000..afaec33d6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js",
+
+ description: "Array.prototype.reduce - value of 'length' is an object which has an own valueOf method",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ return 2;
+ }
+ }
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js
new file mode 100644
index 000000000..2f307e3a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js",
+
+ description: "Array.prototype.reduce - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var valueOfOccured = false;
+ var toStringOccured = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ valueOfOccured = true;
+ return {};
+ },
+ toString: function () {
+ toStringOccured = true;
+ return '2';
+ }
+ }
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfOccured && toStringOccured;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js
new file mode 100644
index 000000000..0981455f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js",
+
+ description: "Array.prototype.reduce throws TypeError exception - 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return true;
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 12,
+
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ },
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.reduce.call(obj, callbackfn, 1);
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && !accessed && toStringAccessed && valueOfAccessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js
new file mode 100644
index 000000000..697ccb05b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js
@@ -0,0 +1,70 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js",
+
+ description: "Array.prototype.reduce uses inherited valueOf method - 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ child.toString = function () {
+ toStringAccessed = true;
+ return '1';
+ };
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: child
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js
new file mode 100644
index 000000000..eedca6bdb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: 2.685
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js
new file mode 100644
index 000000000..26ef9c1b6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = {
+ 1: 11,
+ 2: 9,
+ length: -4294967294.5
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js
new file mode 100644
index 000000000..87948f3d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js",
+
+ description: "Array.prototype.reduce - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = {
+ 0: 12,
+ length: 4294967296
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js
new file mode 100644
index 000000000..41c4b867e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js",
+
+ description: "Array.prototype.reduce - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 0);
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: 4294967297
+ };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js
new file mode 100644
index 000000000..c37887ac0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = { 0: 1, 1: 1, length: 0 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js
new file mode 100644
index 000000000..d28d6ddd2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = { 0: 11, length: +0 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js
new file mode 100644
index 000000000..53f88e671
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = { 0: 11, length: -0 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js
new file mode 100644
index 000000000..4e40e72e4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a number (value is positive)",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: 2 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js
new file mode 100644
index 000000000..7f3b28947
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a number (value is negative)",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal === 11 && idx === 1);
+ }
+
+ var obj = { 1: 11, 2: 9, length: -4294967294 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js
new file mode 100644
index 000000000..63e3d8fa5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return 2;
+ }
+
+ var obj = { 0: 9, length: Infinity };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js
new file mode 100644
index 000000000..9cbd79ec8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js",
+
+ description: "Array.prototype.reduce - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: -Infinity };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js
new file mode 100644
index 000000000..de2bab9e0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js",
+
+description: "Array.prototype.reduce throws TypeError if callbackfn is undefined",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduce();
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js
new file mode 100644
index 000000000..7486e4e27
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js",
+
+ description: "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js
new file mode 100644
index 000000000..66fd936a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js",
+
+ description: "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js
new file mode 100644
index 000000000..31b3e606e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-4-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js",
+
+ description: "Array.prototype.reduce - 'callbackfn' is a function",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return curVal > 10;
+ }
+
+ return [11, 9].reduce(callbackfn, 1) === false && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js
new file mode 100644
index 000000000..20ba2697a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js",
+
+description: "Array.prototype.reduce throws ReferenceError if callbackfn is unreferenced",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduce(foo);
+ }
+ catch(e) {
+ if(e instanceof ReferenceError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js
new file mode 100644
index 000000000..de0a6669d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js",
+
+description: "Array.prototype.reduce throws TypeError if callbackfn is null",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduce(null);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js
new file mode 100644
index 000000000..3b14e4b9a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js",
+
+description: "Array.prototype.reduce throws TypeError if callbackfn is boolean",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduce(true);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js
new file mode 100644
index 000000000..1639215b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js",
+
+description: "Array.prototype.reduce throws TypeError if callbackfn is number",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduce(5);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js
new file mode 100644
index 000000000..a145ee955
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js",
+
+description: "Array.prototype.reduce throws TypeError if callbackfn is string",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduce("abc");
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js
new file mode 100644
index 000000000..9373ba433
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js",
+
+description: "Array.prototype.reduce throws TypeError if callbackfn is Object without [[Call]] internal method",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduce(new Object());
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js
new file mode 100644
index 000000000..e8fd8885a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-4-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js",
+
+ description: "Array.prototype.reduce - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js
new file mode 100644
index 000000000..489fd066e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js",
+
+ description: "Array.prototype.reduce - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js
new file mode 100644
index 000000000..4dcbf2048
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (empty array), no initVal",
+
+test: function testcase() {
+ function cb(){}
+
+ try {
+ [].reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js
new file mode 100644
index 000000000..70771b5b8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js",
+
+ description: "Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 2",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal > 10);
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 0;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js
new file mode 100644
index 000000000..cdf41bb3d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js",
+
+ description: "Array.prototype.reduce - if the exception occurs, it occurs after any side-effects that might be produced by step 3",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal > 10);
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "0";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js
new file mode 100644
index 000000000..db46fd6c7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js",
+
+ description: "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal > 10);
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js
new file mode 100644
index 000000000..2a93dfbcd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js",
+
+ description: "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ return (curVal > 10);
+ }
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+
+ try {
+ Array.prototype.reduce.call(obj, callbackfn);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js
new file mode 100644
index 000000000..98f0372ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to null (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ function cb(){}
+ try {
+ f.reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js
new file mode 100644
index 000000000..7b3777092
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to false (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ function cb(){}
+ try {
+ f.reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js
new file mode 100644
index 000000000..0f439f42d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ function cb(){}
+ try {
+ f.reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js
new file mode 100644
index 000000000..71306e94f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ function cb(){}
+ try {
+ f.reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js
new file mode 100644
index 000000000..f077a786d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj with valueOf), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ function cb(){}
+ try {
+ f.reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js
new file mode 100644
index 000000000..ecd8f932e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ function cb(){}
+ try {
+ f.reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js
new file mode 100644
index 000000000..67044ee2a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-5-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js",
+
+description: "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with []), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ try {
+ f.reduce(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js
new file mode 100644
index 000000000..e3a3ab738
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js",
+
+ description: "Array.prototype.reduce - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ return [].reduce(callbackfn, 3) === 3 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js
new file mode 100644
index 000000000..98e85a51b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (empty array)",
+
+test: function testcase() {
+ function cb(){}
+
+ try {
+ if([].reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js
new file mode 100644
index 000000000..3c7a4b71a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-7-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js",
+
+ description: "Array.prototype.reduce - 'initialValue' is present",
+
+ test: function testcase() {
+
+ var str = "initialValue is present";
+ return str === [].reduce(function () { }, str);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js
new file mode 100644
index 000000000..1719505ad
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-7-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js",
+
+ description: "Array.prototype.reduce - 'initialValue' is not present",
+
+ test: function testcase() {
+
+ var str = "initialValue is not present";
+ return str === [str].reduce(function () { });
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js
new file mode 100644
index 000000000..d1627cf84
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to null (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js
new file mode 100644
index 000000000..bf9537d95
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to false (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js
new file mode 100644
index 000000000..ff198c69a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to 0 (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js
new file mode 100644
index 000000000..fc8335180
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to '0' (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js
new file mode 100644
index 000000000..e81f617e4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js
new file mode 100644
index 000000000..d2972ef28
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js
new file mode 100644
index 000000000..ea2c984dc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [])",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js
new file mode 100644
index 000000000..af884e15a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-7-9",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js",
+
+description: "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0])",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [0];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ try {
+ if(f.reduce(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js
new file mode 100644
index 000000000..2e49f8644
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-ii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js",
+
+ description: "Array.prototype.reduce - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var obj = { };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ obj[1] = "accumulator";
+ return 3;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.reduce.call(obj, function () { }) === "accumulator";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js
new file mode 100644
index 000000000..e6bc95bc3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-ii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js",
+
+ description: "Array.prototype.reduce - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var obj = { 1: "accumulator", 2: "another" };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ delete obj[1];
+ return 3;
+ },
+ configurable: true
+ });
+
+ return "accumulator" !== Array.prototype.reduce.call(obj, function () { });
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js
new file mode 100644
index 000000000..63f4f126c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 0);
+ }
+ }
+
+ var obj = { 0: 0, 1: 1, 2: 2, length: 2 };
+ Array.prototype.reduce.call(obj, callbackfn);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js
new file mode 100644
index 000000000..79e67f750
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 0);
+ }
+ }
+
+ var arr = [0, 1, 2];
+ arr.reduce(callbackfn);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js
new file mode 100644
index 000000000..b498181b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js",
+
+ description: "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 0);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduce.call(arguments, callbackfn);
+ };
+
+ func(0, 1);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js
new file mode 100644
index 000000000..1c1636709
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js",
+
+ description: "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 2) {
+ testResult = (prevVal === 1);
+ }
+ }
+
+ var func = function (a, b, c) {
+ delete arguments[0];
+ Array.prototype.reduce.call(arguments, callbackfn);
+ };
+
+ func(0, 1, 2);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js
new file mode 100644
index 000000000..8f556682e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js",
+
+ description: "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 3) {
+ testResult = (prevVal === 2);
+ }
+ }
+
+ var func = function (a, b, c) {
+ delete arguments[0];
+ delete arguments[1];
+ Array.prototype.reduce.call(arguments, callbackfn);
+ };
+
+ func(0, 1, 2, 3);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js
new file mode 100644
index 000000000..45324a6ac
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js",
+
+ description: "Array.prototype.reduce - applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === "0");
+ }
+ }
+
+ var str = new String("012");
+ Array.prototype.reduce.call(str, callbackfn);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js
new file mode 100644
index 000000000..0acf9f653
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js",
+
+ description: "Array.prototype.reduce - applied to Function object which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 0);
+ }
+ }
+
+ var obj = function (a, b, c) {
+ return a + b + c;
+ };
+ obj[0] = 0;
+ obj[1] = 1;
+ obj[2] = 2;
+ obj[3] = 3;
+
+ Array.prototype.reduce.call(obj, callbackfn);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js
new file mode 100644
index 000000000..1e42d1ae8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === "9");
+ }
+ }
+
+ var proto = { 0: 0, 1: 1, 2: 2, length: 3 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = "9";
+ child[1] = "1";
+ child.length = 3;
+
+ Array.prototype.reduce.call(child, callbackfn);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js
new file mode 100644
index 000000000..13829dc9c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 0);
+ }
+ }
+
+ try {
+ Array.prototype[0] = "9";
+ [0, 1, 2].reduce(callbackfn);
+ return testResult;
+
+ } finally {
+ delete Array.prototype[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js
new file mode 100644
index 000000000..ed13875c4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 0);
+ }
+ }
+
+ var proto = { 0: 0, 1: 1, 2: 2, length: 3 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 3;
+
+ Array.prototype.reduce.call(child, callbackfn);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js
new file mode 100644
index 000000000..3333459a9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-b-iii-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 0);
+ }
+ }
+
+ try {
+ Array.prototype[0] = 0;
+ Array.prototype[1] = 1;
+ Array.prototype[2] = 2;
+ [, , ,].reduce(callbackfn);
+ return testResult;
+ } finally {
+ delete Array.prototype[0];
+ delete Array.prototype[1];
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js
new file mode 100644
index 000000000..666d05c43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-8-c-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js",
+
+description: "Array.prototype.reduce throws TypeError when Array is empty and initialValue is not present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = new Array(10);
+ try {
+ arr.reduce(callbackfn);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js
new file mode 100644
index 000000000..87af7d08f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-8-c-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js",
+
+description: "Array.prototype.reduce throws TypeError when elements assigned values are deleted by reducing array length and initialValue is not present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = new Array(10);
+ arr[9] = 1;
+ arr.length = 5;
+ try {
+ arr.reduce(callbackfn);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js
new file mode 100644
index 000000000..2cdeb05ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-8-c-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js",
+
+description: "Array.prototype.reduce throws TypeError when elements assigned values are deleted and initialValue is not present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = [1,2,3,4,5];
+ delete arr[0];
+ delete arr[1];
+ delete arr[2];
+ delete arr[3];
+ delete arr[4];
+ try {
+ arr.reduce(callbackfn);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js
new file mode 100644
index 000000000..4db1a126d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-c-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js",
+
+ description: "Array.prototype.reduce doesn't throw error when array has no own properties but prototype contains a single property",
+
+ test: function testcase() {
+
+ var arr = [, , , ];
+
+ try {
+ Array.prototype[1] = "prototype";
+ arr.reduce(function () { });
+ return true;
+ } catch (ex) {
+ return false;
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js
new file mode 100644
index 000000000..2bfa914ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-c-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js",
+
+ description: "Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 2",
+
+ test: function testcase() {
+
+ var obj = { };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js
new file mode 100644
index 000000000..e4cff6c5b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-c-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js",
+
+ description: "Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 3",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js
new file mode 100644
index 000000000..e30ddac30
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-c-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js",
+
+ description: "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js
new file mode 100644
index 000000000..5e574c02c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-8-c-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js",
+
+ description: "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduce.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js
new file mode 100644
index 000000000..5235ac075
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.21-9-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js",
+
+ description: "Array.prototype.reduce doesn't consider new elements added to array after it is called",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ arr[5] = 6;
+ arr[2] = 3;
+ return prevVal + curVal;
+ }
+
+ var arr = [1, 2, , 4, '5'];
+ return arr.reduce(callbackfn) === "105";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js
new file mode 100644
index 000000000..c746d78b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-10",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js",
+
+description: "Array.prototype.reduce called with an initial value doesn't consider new elements added to array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ arr[5] = 6;
+ arr[2] = 3;
+ return prevVal + curVal;
+ }
+
+ var arr = [1,2,,4,'5'];
+ return arr.reduce(callbackfn, "") === "12345";
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js
new file mode 100644
index 000000000..0250c8807
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js",
+
+description: "Array.prototype.reduce considers new value of elements in array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ arr[3] = -2;
+ arr[4] = -1;
+ return prevVal + curVal;
+ }
+
+ var arr = [1,2,3,4,5];
+ if(arr.reduce(callbackfn) === 3)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js
new file mode 100644
index 000000000..15d7f0f7f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js",
+
+description: "Array.prototype.reduce doesn't visit deleted elements in array after the call",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ delete arr[3];
+ delete arr[4];
+ return prevVal + curVal;
+ }
+
+ var arr = ['1',2,3,4,5];
+ if(arr.reduce(callbackfn) === "123" ) // two elements deleted
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js
new file mode 100644
index 000000000..5a4a1b194
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js",
+
+description: "Array.prototype.reduce doesn't visit deleted elements when Array.length is decreased",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ arr.length = 2;
+ return prevVal + curVal;
+ }
+
+ var arr = [1,2,3,4,5];
+ if(arr.reduce(callbackfn) === 3 )
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js
new file mode 100644
index 000000000..01c3c7ebe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js",
+
+description: "Array.prototype.reduce - callbackfn not called for array with one element",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ callCnt++;
+ return 2;
+ }
+
+ var arr = [1];
+ if(arr.reduce(callbackfn) === 1 && callCnt === 0 )
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js
new file mode 100644
index 000000000..eef19d4f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js",
+
+description: "Array.prototype.reduce visits deleted element in array after the call when same index is also present in prototype",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ delete arr[3];
+ delete arr[4];
+ return prevVal + curVal;
+ }
+
+ Array.prototype[4] = 5;
+ var arr = ['1',2,3,4,5];
+ var res = arr.reduce(callbackfn);
+ delete Array.prototype[4];
+
+ if(res === "1235" ) //one element acually deleted
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js
new file mode 100644
index 000000000..33b9d9697
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-b-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js",
+
+description: "Array.prototype.reduce returns initialvalue when Array is empty and initialValue is present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = new Array(10);
+
+ if(arr.reduce(callbackfn,5) === 5)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js
new file mode 100644
index 000000000..2619e14a3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-b-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js",
+
+ description: "Array.prototype.reduce - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(accum, val, idx, obj) {
+ if (idx === 2 && val === "2") {
+ testResult = true;
+ }
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ obj[2] = "2";
+ return 3;
+ },
+ configurable: true
+ });
+
+ Array.prototype.reduce.call(obj, callbackfn, "initialValue");
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js
new file mode 100644
index 000000000..39238b8c2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-b-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js",
+
+ description: "Array.prototype.reduce - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var testResult = true;
+
+ function callbackfn(accum, val, idx, obj) {
+ accessed = true;
+ if (idx === 2) {
+ testResult = false;
+ }
+ }
+
+ var obj = { 2: "2", 3: 10 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ delete obj[2];
+ return 5;
+ },
+ configurable: true
+ });
+
+ Array.prototype.reduce.call(obj, callbackfn, "initialValue");
+
+ return accessed && testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js
new file mode 100644
index 000000000..53a653f68
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-c-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js",
+
+description: "Array.prototype.reduce - callbackfn not called for indexes never been assigned values",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ callCnt++;
+ return curVal;
+ }
+
+ var arr = new Array(10);
+ arr[0] = arr[1] = undefined; //explicitly assigning a value
+ if( arr.reduce(callbackfn) === undefined && callCnt === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js
new file mode 100644
index 000000000..05ef0baa5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var obj = { 0: 0, 1: 1, 2: 2, length: 2 };
+ Array.prototype.reduce.call(obj, callbackfn, initialValue);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js
new file mode 100644
index 000000000..b694ee120
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var arr = [0, 1];
+ arr.reduce(callbackfn, initialValue);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js
new file mode 100644
index 000000000..ed6571091
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js",
+
+ description: "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduce.call(arguments, callbackfn, initialValue);
+ };
+
+ func(0, 1);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js
new file mode 100644
index 000000000..574a8112e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js",
+
+ description: "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 2) {
+ testResult = (curVal === 2);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduce.call(arguments, callbackfn, initialValue);
+ };
+
+ func(0, 1, 2);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js
new file mode 100644
index 000000000..189dac36d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js",
+
+ description: "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 3) {
+ testResult = (curVal === 3);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduce.call(arguments, callbackfn, initialValue);
+ };
+
+ func(0, 1, 2, 3);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js
new file mode 100644
index 000000000..724a78286
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js",
+
+ description: "Array.prototype.reduce - applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === "1");
+ }
+ }
+
+ var str = new String("012");
+
+ Array.prototype.reduce.call(str, callbackfn, initialValue);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js
new file mode 100644
index 000000000..c18e3349a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js",
+
+ description: "Array.prototype.reduce - applied to Function object which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var obj = function (a, b, c) {
+ return a + b + c;
+ };
+ obj[0] = 0;
+ obj[1] = 1;
+ obj[2] = 2;
+ obj[3] = 3;
+
+ Array.prototype.reduce.call(obj, callbackfn, initialValue);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js
new file mode 100644
index 000000000..9e5ed7ea4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === "11");
+ }
+ }
+
+ var proto = { 0: 0, 1: 1, 2: 2, length: 2 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = "11";
+ child[2] = "22";
+ child.length = 3;
+
+ Array.prototype.reduce.call(child, callbackfn, initialValue);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js
new file mode 100644
index 000000000..130edc01c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ try {
+ Array.prototype[1] = "3";
+ [0, 1, 2].reduce(callbackfn, initialValue);
+ return testResult;
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js
new file mode 100644
index 000000000..fa2cf1e83
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var proto = { 0: 0, 1: 1, 2: 2, length: 3 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 3;
+
+ Array.prototype.reduce.call(child, callbackfn, initialValue);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js
new file mode 100644
index 000000000..b371ffcb2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js",
+
+ description: "Array.prototype.reduce - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ try {
+ Array.prototype[0] = 0;
+ Array.prototype[1] = 1;
+ Array.prototype[2] = 2;
+ [, , , ].reduce(callbackfn, initialValue);
+
+ return testResult;
+ } finally {
+ delete Array.prototype[0];
+ delete Array.prototype[1];
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js
new file mode 100644
index 000000000..f5ddc8b94
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-c-ii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js",
+
+description: "Array.prototype.reduce - callbackfn called with correct parameters (initialvalue not passed)",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal)
+ return curVal;
+ else
+ return false;
+ }
+
+ var arr = [0,1,true,null,new Object(),"five"];
+ if( arr.reduce(callbackfn) === "five")
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js
new file mode 100644
index 000000000..b5c533a6d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js",
+
+ description: "Array.prototype.reduce - callbackfn is called with 1 formal parameter",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(prevVal) {
+ result = (prevVal === 1);
+ }
+
+ [11].reduce(callbackfn, 1);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js
new file mode 100644
index 000000000..60f5fcf07
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js",
+
+ description: "Array.prototype.reduce - callbackfn is called with 2 formal parameter",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(prevVal, curVal) {
+ result = (curVal > 10 && 1 === prevVal);
+ }
+
+ [11].reduce(callbackfn, 1);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js
new file mode 100644
index 000000000..50d010e39
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js",
+
+ description: "Array.prototype.reduce - callbackfn is called with 3 formal parameter",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(prevVal, curVal, idx) {
+ result = (prevVal === 1 && arguments[3][idx] === curVal);
+ }
+
+ [11].reduce(callbackfn, 1);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js
new file mode 100644
index 000000000..f08442b3c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js",
+
+ description: "Array.prototype.reduce - callbackfn is called with 4 formal parameter",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ result = (prevVal === 1 && obj[idx] === curVal);
+ }
+
+ [11].reduce(callbackfn, 1);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js
new file mode 100644
index 000000000..c621fd9b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js",
+
+ description: "Array.prototype.reduce - callbackfn that uses arguments",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn() {
+ result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]);
+ }
+
+ [11].reduce(callbackfn, 1);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-15.js
new file mode 100644
index 000000000..459d0e903
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-15.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-15.js",
+
+ description: "Array.prototype.reduce - undefined is passed as the value of 'this' of 'callbackfn' for each iteration on an Array-like object",
+
+ test: function testcase() {
+
+ var callled = 0;
+ var result = true;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ callled++;
+ if (!('document' in this && 'open' in this && 'frames' in this)) {
+ result = false;
+ }
+ }
+
+ var obj = { 0: 11, 1: 9, 2: 12, length: 2 };
+
+ Array.prototype.reduce.call(obj, callbackfn, 1);
+
+ return result && callled === 2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js
new file mode 100644
index 000000000..19dab7581
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js",
+
+ description: "Array.prototype.reduce - non-indexed properties are not called",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var result1 = true;
+ var result2 = true;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ if (curVal === 8) {
+ result1 = false;
+ }
+
+ if (prevVal === 8) {
+ result2 = false;
+ }
+ }
+
+ var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };
+
+ Array.prototype.reduce.call(obj, callbackfn, 1);
+ return result1 && result2 && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js
new file mode 100644
index 000000000..156ea72ec
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js",
+
+ description: "Array.prototype.reduce - 'accumulator' used for current iteration is the result of previous iteration on an Array",
+
+ test: function testcase() {
+
+ var result = true;
+ var accessed = false;
+ var preIteration = 1;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ if (preIteration !== prevVal) {
+ result = false;
+ }
+ preIteration = curVal;
+ return curVal;
+ }
+
+ [11, 12, 13].reduce(callbackfn, 1);
+ return result && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js
new file mode 100644
index 000000000..444b52350
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js",
+
+ description: "Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array-like object",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 0) {
+ result = (arguments[0] === 1);
+ }
+ }
+
+ var obj = { 0: 11, 1: 9, length: 2 };
+
+ Array.prototype.reduce.call(obj, callbackfn, 1);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js
new file mode 100644
index 000000000..0e9554878
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js",
+
+ description: "Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of least index property which is not undefined when 'initialValue' is not present on an Array",
+
+ test: function testcase() {
+
+ var called = 0;
+ var result = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ called++;
+ if (idx === 1) {
+ result = (prevVal === 11) && curVal === 9;
+ }
+ }
+
+ [11, 9].reduce(callbackfn);
+ return result && called === 1;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js
new file mode 100644
index 000000000..88b9c9477
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-c-ii-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js",
+
+description: "Array.prototype.reduce - callbackfn called with correct parameters (initialvalue passed)",
+
+test: function testcase() {
+
+ var bParCorrect = false;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ if(idx === 0 && obj[idx] === curVal && prevVal === initialValue)
+ return curVal;
+ else if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal)
+ return curVal;
+ else
+ return false;
+ }
+
+ var arr = [0,1,true,null,new Object(),"five"];
+ var initialValue = 5.5;
+ if( arr.reduce(callbackfn,initialValue) === "five")
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js
new file mode 100644
index 000000000..885e1a937
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js",
+
+ description: "Array.prototype.reduce - undefined can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return typeof prevVal === "undefined";
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, undefined) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js
new file mode 100644
index 000000000..b3860ccfc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js",
+
+ description: "Array.prototype.reduce - null can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === null;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, null) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js
new file mode 100644
index 000000000..7081d51a2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js",
+
+ description: "Array.prototype.reduce - boolean primitive can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === false;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, false) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js
new file mode 100644
index 000000000..793ef5d0b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js",
+
+ description: "Array.prototype.reduce - number primitive can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === 12;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, 12) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js
new file mode 100644
index 000000000..e5f183c83
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js",
+
+ description: "Array.prototype.reduce - string primitive can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === "hello_";
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, "hello_") === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js
new file mode 100644
index 000000000..6e7c8ba83
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js",
+
+ description: "Array.prototype.reduce - Function object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objFunction = function () { };
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objFunction;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objFunction) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js
new file mode 100644
index 000000000..eec31b47f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js",
+
+ description: "Array.prototype.reduce - Array object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objArray = new Array(10);
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objArray;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objArray) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js
new file mode 100644
index 000000000..925232e42
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js",
+
+ description: "Array.prototype.reduce - String object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objString = new String();
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objString;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objString) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js
new file mode 100644
index 000000000..936f05772
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js",
+
+ description: "Array.prototype.reduce - Boolean object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objBoolean = new Boolean();
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objBoolean;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objBoolean) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js
new file mode 100644
index 000000000..ae3e49d4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js",
+
+ description: "Array.prototype.reduce - Number object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objNumber = new Number();
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objNumber;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objNumber) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js
new file mode 100644
index 000000000..a9d5daa5a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.21-9-c-ii-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js",
+
+description: "Array.prototype.reduce - callbackfn takes 4 arguments",
+
+test: function testcase() {
+
+ var bCalled = false;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ bCalled = true;
+ if(prevVal === true && arguments.length === 4)
+ return true;
+ else
+ return false;
+ }
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+ if(arr.reduce(callbackfn,true) === true && bCalled === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js
new file mode 100644
index 000000000..1efa0566a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-30",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js",
+
+ description: "Array.prototype.reduce - the Math object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === Math;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, Math) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js
new file mode 100644
index 000000000..06d1adf65
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-31",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js",
+
+ description: "Array.prototype.reduce - Date object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objDate = new Date();
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objDate;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objDate) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js
new file mode 100644
index 000000000..34a65c21b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-32",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js",
+
+ description: "Array.prototype.reduce - RegExp object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objRegExp = new RegExp();
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objRegExp;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objRegExp) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js
new file mode 100644
index 000000000..46643f724
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-33",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js",
+
+ description: "Array.prototype.reduce - the JSON can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === JSON;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, JSON) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js
new file mode 100644
index 000000000..d6917b4d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-34",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js",
+
+ description: "Array.prototype.reduce - Error object can be used as accumulator",
+
+ test: function testcase() {
+
+ var objError = new RangeError();
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objError;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduce.call(obj, callbackfn, objError) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js
new file mode 100644
index 000000000..c73afa8ea
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-35",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js",
+
+ description: "Array.prototype.reduce - the Arguments object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var arg;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === arg;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ (function fun() {
+ arg = arguments;
+ }(10, 11, 12, 13));
+
+ return Array.prototype.reduce.call(obj, callbackfn, arg) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js
new file mode 100644
index 000000000..c8903841e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js",
+
+ description: "Array.prototype.reduce - k values are passed in acending numeric order on an Array",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2];
+ var lastIdx = 0;
+ var result = true;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ if (lastIdx !== idx) {
+ result = false;
+ } else {
+ lastIdx++;
+ }
+ }
+
+ arr.reduce(callbackfn, 11);
+ return result && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js
new file mode 100644
index 000000000..8e291d29b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js
@@ -0,0 +1,62 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js",
+
+ description: "Array.prototype.reduce - k values are accessed during each iteration and not prior to starting the loop on an Array",
+
+ test: function testcase() {
+
+ var result = true;
+ var kIndex = [];
+ var called = 0;
+
+ //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(prevVal, curVal, idx, obj) {
+ //Each position should be visited one time, which means k is accessed one time during iterations.
+ called++;
+ if (typeof kIndex[idx] === "undefined") {
+ //when current position is visited, its previous index should has been visited.
+ if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") {
+ result = false;
+ }
+ kIndex[idx] = 1;
+ } else {
+ result = false;
+ }
+ }
+
+ [11, 12, 13, 14].reduce(callbackfn, 1);
+
+ return result && called === 4;
+ },
+
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-6.js
new file mode 100644
index 000000000..97b7b805e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-6.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-6.js",
+
+ description: "Array.prototype.reduce - arguments to callbackfn are self consistent",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, length: 1 };
+
+ var result = false;
+ function callbackfn() {
+ result = ('document' in this &&
+ 'open' in this &&
+ 'frames' in this &&
+ arguments[0] === 111 &&
+ arguments[1] === 11 &&
+ arguments[2] === 0 &&
+ arguments[3] === obj);
+ }
+
+ Array.prototype.reduce.call(obj, callbackfn, 111);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js
new file mode 100644
index 000000000..34a32b1de
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js",
+
+ description: "Array.prototype.reduce - unhandled exceptions happened in callbackfn terminate iteration",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 0) {
+ accessed = true;
+ }
+ if (idx === 0) {
+ throw new Error("Exception occurred in callbackfn");
+ }
+ }
+
+ var obj = { 0: 11, 4: 10, 10: 8, length: 20 };
+
+ try {
+ Array.prototype.reduce.call(obj, callbackfn, 1);
+ return false;
+ } catch (ex) {
+ return (ex instanceof Error) && !accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js
new file mode 100644
index 000000000..97df29d49
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js",
+
+ description: "Array.prototype.reduce - element changed by callbackfn on previous iterations is observed",
+
+ test: function testcase() {
+
+ var result = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 0) {
+ obj[idx + 1] = 8;
+ }
+
+ if (idx === 1) {
+ result = (curVal === 8);
+ }
+ }
+
+ var obj = { 0: 11, 1: 12, length: 2 };
+
+ Array.prototype.reduce.call(obj, callbackfn, 1);
+ return result;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js
new file mode 100644
index 000000000..6419914a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.21-9-c-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js",
+
+ description: "Array.prototype.reduce - callbackfn is called with 0 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+ function callbackfn() {
+ called++;
+ }
+
+ [11, 12].reduce(callbackfn, 1);
+ return 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduce);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js
new file mode 100644
index 000000000..9e9ca8e5e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-0-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js",
+
+description: "Array.prototype.reduceRight must exist as a function",
+
+test: function testcase() {
+ var f = Array.prototype.reduceRight;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js
new file mode 100644
index 000000000..0fe764a1b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-0-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js",
+
+description: "Array.prototype.reduceRight.length must be 1",
+
+test: function testcase() {
+ if (Array.prototype.reduceRight.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js
new file mode 100644
index 000000000..2fcdcb810
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js",
+
+ description: "Array.prototype.reduceRight applied to undefined throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.reduceRight.call(undefined);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js
new file mode 100644
index 000000000..3edafb3af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js",
+
+ description: "Array.prototype.reduceRight applied to the Math object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return '[object Math]' === Object.prototype.toString.call(obj);
+ }
+
+ try {
+ Math.length = 1;
+ Math[0] = 1;
+ return Array.prototype.reduceRight.call(Math, callbackfn, 1) && accessed;
+ } finally {
+ delete Math[0];
+ delete Math.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js
new file mode 100644
index 000000000..f8c55f8d7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js",
+
+ description: "Array.prototype.reduceRight applied to Date object",
+
+ test: function testcase() {
+
+ var obj = new Date();
+ obj.length = 1;
+ obj[0] = 1;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj instanceof Date;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js
new file mode 100644
index 000000000..8c2b0df8d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js",
+
+ description: "Array.prototype.reduceRight applied to RegExp object",
+
+ test: function testcase() {
+
+ var obj = new RegExp();
+ obj.length = 1;
+ obj[0] = 1;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, o) {
+ accessed = true;
+ return o instanceof RegExp;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js
new file mode 100644
index 000000000..28eda5e40
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js",
+
+ description: "Array.prototype.reduceRight applied to the JSON object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return ('[object JSON]' === Object.prototype.toString.call(obj));
+ }
+
+ try {
+ JSON.length = 1;
+ JSON[0] = 1;
+ return Array.prototype.reduceRight.call(JSON, callbackfn, 1) && accessed;
+ } finally {
+ delete JSON.length;
+ delete JSON[0];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js
new file mode 100644
index 000000000..4afbaabfe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js",
+
+ description: "Array.prototype.reduceRight applied to Error object",
+
+ test: function testcase() {
+
+ var obj = new Error();
+ obj.length = 1;
+ obj[0] = 1;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, o) {
+ accessed = true;
+ return o instanceof Error;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js
new file mode 100644
index 000000000..af2bd6be7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js",
+
+ description: "Array.prototype.reduceRight applied to the Arguments object",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return '[object Arguments]' === Object.prototype.toString.call(obj);
+ }
+
+ var obj = (function () {
+ return arguments;
+ }("a", "b"));
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, "a") && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js
new file mode 100644
index 000000000..163be654d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js",
+
+ description: "Array.prototype.reduceRight applied to null throws a TypeError",
+
+ test: function testcase() {
+ try {
+ Array.prototype.reduceRight.call(null);
+ return false;
+ } catch (e) {
+ return (e instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js
new file mode 100644
index 000000000..816c41b47
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js",
+
+ description: "Array.prototype.reduceRight applied to boolean primitive",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj instanceof Boolean;
+ }
+
+ try {
+ Boolean.prototype[0] = 1;
+ Boolean.prototype.length = 1;
+ return Array.prototype.reduceRight.call(false, callbackfn, 1) && accessed;
+ } finally {
+ delete Boolean.prototype[0];
+ delete Boolean.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js
new file mode 100644
index 000000000..ca76b64b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js",
+
+ description: "Array.prototype.reduceRight applied to Boolean object",
+
+ test: function testcase() {
+
+ var obj = new Boolean(true);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj instanceof Boolean;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js
new file mode 100644
index 000000000..6486ab859
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js",
+
+ description: "Array.prototype.reduceRight applied to number primitive",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj instanceof Number;
+ }
+
+ try {
+ Number.prototype[0] = 1;
+ Number.prototype.length = 1;
+ return Array.prototype.reduceRight.call(2.5, callbackfn, 1) && accessed;
+ } finally {
+ delete Number.prototype[0];
+ delete Number.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js
new file mode 100644
index 000000000..caece69ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js",
+
+ description: "Array.prototype.reduceRight applied to Number object",
+
+ test: function testcase() {
+
+ var obj = new Number(-128);
+ obj.length = 2;
+ obj[0] = 11;
+ obj[1] = 12;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, o) {
+ accessed = true;
+ return o instanceof Number;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js
new file mode 100644
index 000000000..05f11136e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js",
+
+ description: "Array.prototype.reduceRight applied to string primitive",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj instanceof String;
+ }
+
+ return Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js
new file mode 100644
index 000000000..1d92f76f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js",
+
+ description: "Array.prototype.reduceRight applied to String object",
+
+ test: function testcase() {
+
+ var obj = new String("hello\nworld\\!");
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, o) {
+ accessed = true;
+ return o instanceof String;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, "h") && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js
new file mode 100644
index 000000000..408e434af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-1-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js",
+
+ description: "Array.prototype.reduceRight applied to Function object",
+
+ test: function testcase() {
+
+ var obj = function (a, b) {
+ return a + b;
+ };
+ obj[0] = 11;
+ obj[1] = 9;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, o) {
+ accessed = true;
+ return o instanceof Function;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js
new file mode 100644
index 000000000..b973c594b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js",
+
+description: "Array.prototype.reduceRight doesn't mutate the Array on which it is called on",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ return 1;
+ }
+ var srcArr = [1,2,3,4,5];
+ srcArr.reduceRight(callbackfn);
+ if(srcArr[0] === 1 &&
+ srcArr[1] === 2 &&
+ srcArr[2] === 3 &&
+ srcArr[3] === 4 &&
+ srcArr[4] === 5)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js
new file mode 100644
index 000000000..8055951fb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js",
+
+description: "Array.prototype.reduceRight reduces array in descending order of indices",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ return prevVal + curVal;
+ }
+ var srcArr = ['1','2','3','4','5'];
+ if(srcArr.reduceRight(callbackfn) === '54321')
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js
new file mode 100644
index 000000000..a828d3efb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js",
+
+description: "Array.prototype.reduceRight - subclassed array with length 1",
+
+test: function testcase() {
+ foo.prototype = [1];
+ function foo() {}
+ var f = new foo();
+
+ function cb(){}
+ if(f.reduceRight(cb) === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js
new file mode 100644
index 000000000..01489868b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js",
+
+description: "Array.prototype.reduceRight - subclassed array with length more than 1",
+
+test: function testcase() {
+ foo.prototype = new Array(0, 1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
+ if(f.reduceRight(cb) === 6)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js
new file mode 100644
index 000000000..dbf2b30fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js",
+
+description: "Array.prototype.reduceRight reduces array in descending order of indices(initialvalue present)",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ return prevVal + curVal;
+ }
+ var srcArr = ['1','2','3','4','5'];
+ if(srcArr.reduceRight(callbackfn,'6') === '654321')
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js
new file mode 100644
index 000000000..fdbef849e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js",
+
+description: "Array.prototype.reduceRight - subclassed array when initialvalue provided",
+
+test: function testcase() {
+ foo.prototype = new Array(0, 1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
+ if(f.reduceRight(cb,"4") === "43210")
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js
new file mode 100644
index 000000000..500febcfa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js",
+
+description: "Array.prototype.reduceRight - subclassed array when length to 1 and initialvalue provided",
+
+test: function testcase() {
+ foo.prototype = [1];
+ function foo() {}
+ var f = new foo();
+
+ function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
+ if(f.reduceRight(cb,"4") === "41")
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js
new file mode 100644
index 000000000..a68457fed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-10-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js",
+
+description: "Array.prototype.reduceRight doesn't visit expandos",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ callCnt++;
+ }
+ var srcArr = ['1','2','3','4','5'];
+ srcArr["i"] = 10;
+ srcArr[true] = 11;
+
+ srcArr.reduceRight(callbackfn);
+
+ if(callCnt == 4)
+ {
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js
new file mode 100644
index 000000000..24b8ee297
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: 2
+ };
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js
new file mode 100644
index 000000000..3ef95e661
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js
@@ -0,0 +1,66 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited accessor property",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var Con = function () { };
+
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ var proto = {};
+
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+
+ return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js
new file mode 100644
index 000000000..ec3ecf89a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return typeof obj.length === "undefined";
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12
+ };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js
new file mode 100644
index 000000000..7180feb45
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js
@@ -0,0 +1,64 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js",
+
+ description: "Array.prototype.reduceRight - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return typeof obj.length === "undefined";
+ }
+
+ try {
+ Object.defineProperty(Object.prototype, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ var obj = { 0: 12, 1: 13 };
+ Object.defineProperty(obj, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed;
+ } finally {
+ delete Object.prototype.length;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js
new file mode 100644
index 000000000..99905d0b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js",
+
+ description: "Array.prototype.reduceRight applied to the Array-like object that 'length' is inherited accessor property without a get function",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return curVal > 10;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ set: function () { },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 11;
+ child[1] = 12;
+
+ return Array.prototype.reduceRight.call(child, callbackfn, 111) === 111 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js
new file mode 100644
index 000000000..83e38c8ba
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js",
+
+ description: "Array.prototype.reduceRight applied to the Array-like object that 'length' property doesn't exist",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return curVal > 10;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js
new file mode 100644
index 000000000..393e9a076
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js",
+
+ description: "Array.prototype.reduceRight applied to the Arguments object, which implements its own property get method",
+
+ test: function testcase() {
+
+ var arg;
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ var func = function (a, b) {
+ arg = arguments;
+ return Array.prototype.reduceRight.call(arguments, callbackfn, 11);
+ };
+
+ return func(12, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js
new file mode 100644
index 000000000..1838dc4a7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js",
+
+ description: "Array.prototype.reduceRight applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var str = new String("432");
+
+ function callbackfn(preVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 3;
+ }
+
+ try {
+ String.prototype[3] = "1";
+ return Array.prototype.reduceRight.call(str, callbackfn, 111) && accessed;
+ } finally {
+ delete String.prototype[3];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js
new file mode 100644
index 000000000..08a0d65fb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js",
+
+ description: "Array.prototype.reduceRight applied to Function object, which implements its own property get method",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var fun = function (a, b) {
+ return a + b;
+ };
+ fun[0] = 12;
+ fun[1] = 11;
+ fun[2] = 9;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ return Array.prototype.reduceRight.call(fun, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js
new file mode 100644
index 000000000..8cf787599
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js",
+
+ description: "Array.prototype.reduceRight - 'length' is own data property on an Array",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ return [12, 11].reduceRight(callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js
new file mode 100644
index 000000000..3e889d481
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ var accessed = true;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 2;
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduceRight.call(child, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js
new file mode 100644
index 000000000..3de84281c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js",
+
+ description: "Array.prototype.reduceRight - 'length' is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var arrProtoLen;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ try {
+ arrProtoLen = Array.prototype.length;
+ Array.prototype.length = 0;
+
+ return [12, 11].reduceRight(callbackfn, 11) && accessed;
+ } finally {
+ Array.prototype.length = arrProtoLen;
+ }
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js
new file mode 100644
index 000000000..99994f963
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js
@@ -0,0 +1,67 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ Object.defineProperty(child, "length", {
+ value: 2,
+ configurable: true
+ });
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduceRight.call(child, callbackfn) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js
new file mode 100644
index 000000000..2437410f0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited data property",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var proto = { length: 2 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ function callbackfn1(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ return Array.prototype.reduceRight.call(child, callbackfn1, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js
new file mode 100644
index 000000000..219e9afe9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property",
+
+ test: function testcase() {
+
+ var accessed = true;
+ var obj = {};
+ obj[0] = 12;
+ obj[1] = 11;
+ obj[2] = 9;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js
new file mode 100644
index 000000000..b09dc6ceb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ var proto = { length: 3 };
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js
new file mode 100644
index 000000000..5fe7371e3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js
@@ -0,0 +1,69 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-2-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js",
+
+ description: "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn1(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return obj.length === 2;
+ }
+
+ var proto = {};
+ Object.defineProperty(proto, "length", {
+ get: function () {
+ return 3;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ Object.defineProperty(child, "length", {
+ get: function () {
+ return 2;
+ },
+ configurable: true
+ });
+ child[0] = 12;
+ child[1] = 11;
+ child[2] = 9;
+
+ return Array.prototype.reduceRight.call(child, callbackfn1, 111) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js
new file mode 100644
index 000000000..1cb80a737
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is undefined",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: undefined };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js
new file mode 100644
index 000000000..dd0842ab0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is NaN)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: NaN };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js
new file mode 100644
index 000000000..8ac29198b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string containing a positive number",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "2" };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js
new file mode 100644
index 000000000..12a082d48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string containing a negative number",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js
new file mode 100644
index 000000000..158ca39b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string containing a decimal number",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js
new file mode 100644
index 000000000..897b0b2fb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js
@@ -0,0 +1,63 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string containing +/-Infinity",
+
+ test: function testcase() {
+
+ var accessed1 = false;
+ var accessed2 = false;
+ var accessed3 = false;
+
+ function callbackfn1(prevVal, curVal, idx, obj) {
+ accessed1 = true;
+ }
+
+ function callbackfn2(prevVal, curVal, idx, obj) {
+ accessed2 = true;
+ }
+
+ function callbackfn3(prevVal, curVal, idx, obj) {
+ accessed3 = true;
+ }
+
+ var obj1 = { 0: 9, length: "Infinity" };
+ var obj2 = { 0: 9, length: "-Infinity" };
+ var obj3 = { 0: 9, length: "+Infinity" };
+
+ return Array.prototype.reduceRight.call(obj1, callbackfn1, 1) === 1 &&
+ Array.prototype.reduceRight.call(obj2, callbackfn2, 2) === 2 &&
+ Array.prototype.reduceRight.call(obj3, callbackfn3, 3) === 3 &&
+ !accessed1 && !accessed2 && !accessed3;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js
new file mode 100644
index 000000000..c15aa7fbf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string containing an exponential number",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js
new file mode 100644
index 000000000..10be221b2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string containing a hex number",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js
new file mode 100644
index 000000000..f085a76d5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string containing a number with leading zeros",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js
new file mode 100644
index 000000000..a0d070789
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a string that can't convert to a number",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, 1: 8, length: "two" };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js
new file mode 100644
index 000000000..597cd0ea3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is an object which has an own toString method",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var toStringAccessed = false;
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: {
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ }
+ }
+ };
+
+ // objects inherit the default valueOf() method from Object
+ // that simply returns itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2 && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js
new file mode 100644
index 000000000..cc90528cf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js",
+
+ description: "Array.prototype.reduceRight applied to an Array-like object, 'length' is 0 (length overridden to false(type conversion))",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(preVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: false };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js
new file mode 100644
index 000000000..78d6b5825
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js
@@ -0,0 +1,68 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is an Object which has an own valueOf method",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var valueOfAccessed = false;
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ }
+ };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2 && valueOfAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js
new file mode 100644
index 000000000..038ac1d1d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js
@@ -0,0 +1,73 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js",
+
+ description: "Array.prototype.reduceRight - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ },
+ toString: function () {
+ toStringAccessed = true;
+ return '2';
+ }
+ }
+ };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2 && valueOfAccessed && toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js
new file mode 100644
index 000000000..6b43a27ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js
@@ -0,0 +1,69 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js",
+
+ description: "Array.prototype.reduceRight throws TypeError exception when 'length' is an object with toString and valueOf methods that don’t return primitive values",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var toStringAccessed = false;
+ var valueOfAccessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 12,
+
+ length: {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return {};
+ },
+ toString: function () {
+ toStringAccessed = true;
+ return {};
+ }
+ }
+ };
+
+ try {
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js
new file mode 100644
index 000000000..03792b0c1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js
@@ -0,0 +1,79 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js",
+
+ description: "Array.prototype.reduceRight uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ var valueOfAccessed = false;
+ var toStringAccessed = false;
+
+ var proto = {
+ valueOf: function () {
+ valueOfAccessed = true;
+ return 2;
+ }
+ };
+ var Con = function () { };
+ Con.prototype = proto;
+ var child = new Con();
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ child.toString = function () {
+ toStringAccessed = true;
+ return '1';
+ };
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: child
+ };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2 && valueOfAccessed && !toStringAccessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js
new file mode 100644
index 000000000..da151e63d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js
new file mode 100644
index 000000000..8a33d7904
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = {
+ 0: 12,
+ 1: 11,
+ 2: 9,
+ length: -4294967294.5
+ };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js
new file mode 100644
index 000000000..aaad1bf9a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is boundary value (2^32)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = {
+ 0: 12,
+ length: 4294967296
+ };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js
new file mode 100644
index 000000000..2ea16b112
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is boundary value (2^32 + 1)",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 0) {
+ testResult1 = false;
+ }
+
+ if (idx === 0) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = {
+ 0: 11,
+ 1: 9,
+ length: 4294967297
+ };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js
new file mode 100644
index 000000000..9345af107
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is 0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: 0 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js
new file mode 100644
index 000000000..5c90ae5b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is +0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: +0 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js
new file mode 100644
index 000000000..f20b13fb1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is -0)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(preVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: -0 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js
new file mode 100644
index 000000000..d86c7572e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is positive)",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 1: 11, 2: 9, length: 2 };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js
new file mode 100644
index 000000000..a83c3292e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is negative)",
+
+ test: function testcase() {
+
+ var testResult1 = true;
+ var testResult2 = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx > 1) {
+ testResult1 = false;
+ }
+
+ if (idx === 1) {
+ testResult2 = true;
+ }
+ return false;
+ }
+
+ var obj = { 1: 11, 2: 9, length: -4294967294 };
+
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return testResult1 && testResult2;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js
new file mode 100644
index 000000000..e7248d309
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: Infinity };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js
new file mode 100644
index 000000000..01e783f90
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-3-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js",
+
+ description: "Array.prototype.reduceRight - value of 'length' is a number (value is -Infinity)",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ }
+
+ var obj = { 0: 9, length: -Infinity };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js
new file mode 100644
index 000000000..64edbf1a1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-4-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js",
+
+description: "Array.prototype.reduceRight throws TypeError if callbackfn is undefined",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight();
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js
new file mode 100644
index 000000000..856928a34
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-4-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js",
+
+ description: "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js
new file mode 100644
index 000000000..b59ad1a93
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-4-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js",
+
+ description: "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, undefined);
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js
new file mode 100644
index 000000000..36516a69b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-4-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js",
+
+ description: "Array.prototype.reduceRight - 'callbackfn' is a function",
+
+ test: function testcase() {
+
+ var initialValue = 0;
+ function callbackfn(accum, val, idx, obj) {
+ accum += val;
+ return accum;
+ }
+
+ return 20 === [11, 9].reduceRight(callbackfn, initialValue);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js
new file mode 100644
index 000000000..4136a32fd
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-4-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js",
+
+description: "Array.prototype.reduceRight throws ReferenceError if callbackfn is unreferenced",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight(foo);
+ }
+ catch(e) {
+ if(e instanceof ReferenceError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js
new file mode 100644
index 000000000..62e55e603
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-4-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js",
+
+description: "Array.prototype.reduceRight throws TypeError if callbackfn is null",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight(null);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js
new file mode 100644
index 000000000..4a150212c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-4-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js",
+
+description: "Array.prototype.reduceRight throws TypeError if callbackfn is boolean",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight(true);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js
new file mode 100644
index 000000000..42ad132ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-4-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js",
+
+description: "Array.prototype.reduceRight throws TypeError if callbackfn is number",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight(5);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js
new file mode 100644
index 000000000..a088cd135
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-4-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js",
+
+description: "Array.prototype.reduceRight throws TypeError if callbackfn is string",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight("abc");
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js
new file mode 100644
index 000000000..c6726bb0c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js
@@ -0,0 +1,45 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-4-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js",
+
+description: "Array.prototype.reduceRight throws TypeError if callbackfn is Object without [[Call]] internal method",
+
+test: function testcase() {
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight(new Object());
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js
new file mode 100644
index 000000000..c1f239981
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-4-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js",
+
+ description: "Array.prototype.reduceRight - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js
new file mode 100644
index 000000000..68a8a0993
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-4-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js",
+
+ description: "Array.prototype.reduceRight - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, null);
+ return false;
+ } catch (ex) {
+ return ex instanceof TypeError && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js
new file mode 100644
index 000000000..069b80884
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (empty array), no initVal",
+
+test: function testcase() {
+ function cb(){}
+
+ try {
+ [].reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js
new file mode 100644
index 000000000..122d199a6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-5-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js",
+
+ description: "Array.prototype.reduceRight - side-effects produced by step 2 when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 0;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js
new file mode 100644
index 000000000..24d265719
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-5-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js",
+
+ description: "Array.prototype.reduceRight - side-effects produced by step 3 when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "0";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js
new file mode 100644
index 000000000..500c8446b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-5-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js",
+
+ description: "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js
new file mode 100644
index 000000000..4da861dd4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-5-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js",
+
+ description: "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = { 0: 11, 1: 12 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js
new file mode 100644
index 000000000..7d4257eaf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to null (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ function cb(){}
+ try {
+ f.reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js
new file mode 100644
index 000000000..24d103f04
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to false (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ function cb(){}
+ try {
+ f.reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js
new file mode 100644
index 000000000..11558deb5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ function cb(){}
+ try {
+ f.reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js
new file mode 100644
index 000000000..8ecbaa674
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ function cb(){}
+ try {
+ f.reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js
new file mode 100644
index 000000000..20475e500
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj with valueOf), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ function cb(){}
+ try {
+ f.reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js
new file mode 100644
index 000000000..e77281c48
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ function cb(){}
+ try {
+ f.reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js
new file mode 100644
index 000000000..34bceb51e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js
@@ -0,0 +1,65 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-5-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js",
+
+description: "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with []), no initVal",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ try {
+ f.reduceRight(cb);
+ }
+ catch (e) {
+ if (e instanceof TypeError) {
+ return true;
+ }
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js
new file mode 100644
index 000000000..115d80933
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-5-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js",
+
+ description: "Array.prototype.reduceRight - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present",
+
+ test: function testcase() {
+
+ var initialValue = 10;
+ return initialValue === [].reduceRight(function () { }, initialValue);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js
new file mode 100644
index 000000000..4801653a4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (empty array)",
+
+test: function testcase() {
+ function cb(){}
+
+ try {
+ if([].reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js
new file mode 100644
index 000000000..e9f26b78b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-7-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js",
+
+ description: "Array.prototype.reduceRight - 'initialValue' is present",
+
+ test: function testcase() {
+
+ var str = "initialValue is present";
+ return str === [].reduceRight(function () { }, str);
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js
new file mode 100644
index 000000000..6c08f1eb5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-7-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js",
+
+ description: "Array.prototype.reduceRight - 'initialValue' is not present",
+
+ test: function testcase() {
+
+ var str = "initialValue is not present";
+ return str === [str].reduceRight(function () { });
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js
new file mode 100644
index 000000000..ad8d9d949
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to null (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = null;
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js
new file mode 100644
index 000000000..8852bb41b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to false (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = false;
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js
new file mode 100644
index 000000000..b51617930
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to 0 (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = 0;
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js
new file mode 100644
index 000000000..3eb4e7ff2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to '0' (type conversion))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+ f.length = '0';
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js
new file mode 100644
index 000000000..287167390
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj with valueOf)",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { valueOf: function () { return 0;}};
+ f.length = o;
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js
new file mode 100644
index 000000000..7c52dbe00
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-7",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString))",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ var o = { toString: function () { return '0';}};
+ f.length = o;
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js
new file mode 100644
index 000000000..85fe44bd9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-8",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [])",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js
new file mode 100644
index 000000000..bef70e808
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-7-9",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js",
+
+description: "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0])",
+
+test: function testcase() {
+ foo.prototype = new Array(1, 2, 3);
+ function foo() {}
+ var f = new foo();
+
+ f.length = [0];
+
+ // objects inherit the default valueOf method of the Object object;
+ // that simply returns the itself. Since the default valueOf() method
+ // does not return a primitive value, ES next tries to convert the object
+ // to a number by calling its toString() method and converting the
+ // resulting string to a number.
+ //
+ // The toString( ) method on Array converts the array elements to strings,
+ // then returns the result of concatenating these strings, with commas in
+ // between. An array with no elements converts to the empty string, which
+ // converts to the number 0. If an array has a single element that is a
+ // number n, the array converts to a string representation of n, which is
+ // then converted back to n itself. If an array contains more than one element,
+ // or if its one element is not a number, the array converts to NaN.
+
+ function cb(){}
+ try {
+ if(f.reduceRight(cb,1) === 1)
+ return true;
+ }
+ catch (e) { }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js
new file mode 100644
index 000000000..04c5cbe95
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-ii-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js",
+
+ description: "Array.prototype.reduceRight - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ function callbackfn(prevVal, curVal, idx, obj) { }
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ obj[2] = "accumulator";
+ return 3;
+ },
+ configurable: true
+ });
+
+ return Array.prototype.reduceRight.call(obj, callbackfn) === "accumulator";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js
new file mode 100644
index 000000000..ab2972425
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-ii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js",
+
+ description: "Array.prototype.reduceRight - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var obj = { 2: "accumulator", 3: "another" };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ delete obj[2];
+ return 5;
+ },
+ configurable: true
+ });
+
+ return "accumulator" !== Array.prototype.reduceRight.call(obj, function () { });
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js
new file mode 100644
index 000000000..c84ec7b6c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 0) {
+ testResult = (prevVal === 1);
+ }
+ }
+
+ var obj = { 0: 0, 1: 1, length: 2 };
+
+ Array.prototype.reduceRight.call(obj, callbackfn);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js
new file mode 100644
index 000000000..04bce4291
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+ }
+
+ var arr = [0, 1, 2];
+
+ arr.reduceRight(callbackfn);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js
new file mode 100644
index 000000000..594f0c8e3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js",
+
+ description: "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 0) {
+ testResult = (prevVal === 1);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduceRight.call(arguments, callbackfn);
+ };
+
+ func(0, 1);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js
new file mode 100644
index 000000000..a4fb16351
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js",
+
+ description: "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduceRight.call(arguments, callbackfn);
+ };
+
+ func(0, 1, 2);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js
new file mode 100644
index 000000000..1d857d5e3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js",
+
+ description: "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 2) {
+ testResult = (prevVal === 3);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduceRight.call(arguments, callbackfn);
+ };
+
+ func(0, 1, 2, 3);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js
new file mode 100644
index 000000000..434853d16
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js",
+
+ description: "Array.prototype.reduceRight applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === "2");
+ }
+ }
+
+ var str = new String("012");
+
+ Array.prototype.reduceRight.call(str, callbackfn);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js
new file mode 100644
index 000000000..ddae9101d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js",
+
+ description: "Array.prototype.reduceRight applied to Function object which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+ }
+
+ var obj = function (a, b, c) {
+ return a + b + c;
+ };
+
+ obj[0] = 0;
+ obj[1] = 1;
+ obj[2] = 2;
+
+ Array.prototype.reduceRight.call(obj, callbackfn);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js
new file mode 100644
index 000000000..281c1c230
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === "20");
+ }
+ }
+
+ var proto = { 0: 0, 1: 1, 2: 2, length: 2 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = "10";
+ child[2] = "20";
+ child.length = 3;
+
+ Array.prototype.reduceRight.call(child, callbackfn);
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js
new file mode 100644
index 000000000..319108324
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+ }
+
+ try {
+ Array.prototype[2] = "11";
+ [0, 1, 2].reduceRight(callbackfn);
+ return testResult;
+
+ } finally {
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js
new file mode 100644
index 000000000..c5ba174f5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+ }
+
+ var proto = { 0: 0, 1: 1, 2: 2, length: 3 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+
+ Array.prototype.reduceRight.call(child, callbackfn);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js
new file mode 100644
index 000000000..17b1092ff
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-b-iii-1-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 2);
+ }
+ }
+
+ try {
+ Array.prototype[0] = 0;
+ Array.prototype[1] = 1;
+ Array.prototype[2] = 2;
+ [, , ,].reduceRight(callbackfn);
+ return testResult;
+
+ } finally {
+ delete Array.prototype[0];
+ delete Array.prototype[1];
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js
new file mode 100644
index 000000000..0585a4853
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-8-c-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js",
+
+description: "Array.prototype.reduceRight throws TypeError when Array is empty and initialValue is not present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = new Array(10);
+ try {
+ arr.reduceRight(callbackfn);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js
new file mode 100644
index 000000000..51865416d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-8-c-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js",
+
+description: "Array.prototype.reduceRight throws TypeError when elements assigned values are deleted by reducign array length and initialValue is not present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = new Array(10);
+ arr[9] = 1;
+ arr.length = 5;
+ try {
+ arr.reduceRight(callbackfn);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js
new file mode 100644
index 000000000..c51f1eac7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-8-c-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js",
+
+description: "Array.prototype.reduceRight throws TypeError when elements assigned values are deleted and initialValue is not present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = [1,2,3,4,5];
+ delete arr[0];
+ delete arr[1];
+ delete arr[2];
+ delete arr[3];
+ delete arr[4];
+ try {
+ arr.reduceRight(callbackfn);
+ }
+ catch(e) {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js
new file mode 100644
index 000000000..cc561e4f7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-c-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js",
+
+ description: "Array.prototype.reduceRight doesn't throw error when array has no own properties but prototype contains a single property",
+
+ test: function testcase() {
+
+ var arr = [, , , ];
+
+ try {
+ Array.prototype[1] = "prototype";
+ arr.reduceRight(function () { });
+ return true;
+ } catch (ex) {
+ return false;
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js
new file mode 100644
index 000000000..a50898e86
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js
@@ -0,0 +1,56 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-c-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js",
+
+ description: "Array.prototype.reduceRight - side effects produced by step 2 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = { };
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ accessed = true;
+ return 2;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js
new file mode 100644
index 000000000..eb2d67bf8
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-c-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js",
+
+ description: "Array.prototype.reduceRight - side effects produced by step 3 are visible when an exception occurs",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ var accessed = false;
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ accessed = true;
+ return "2";
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return (ex instanceof TypeError) && accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js
new file mode 100644
index 000000000..2fcf8e764
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-c-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js",
+
+ description: "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ throw new SyntaxError();
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js
new file mode 100644
index 000000000..fe239894c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-8-c-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js",
+
+ description: "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3",
+
+ test: function testcase() {
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ return {
+ toString: function () {
+ throw new SyntaxError();
+ }
+ };
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, function () { });
+ return false;
+ } catch (ex) {
+ return !(ex instanceof TypeError);
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js
new file mode 100644
index 000000000..34791368e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.22-9-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js",
+
+ description: "Array.prototype.reduceRight doesn't consider new elements which index is larger than array original length added to array after it is called, consider new elements which index is smaller than array length",
+
+ test: function testcase() {
+ function callbackfn(prevVal, curVal, idx, obj) {
+ arr[5] = 6;
+ arr[2] = 3;
+ return prevVal + curVal;
+ }
+
+ var arr = ['1', 2, , 4, '5'];
+ return arr.reduceRight(callbackfn) === "54321";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js
new file mode 100644
index 000000000..4d51be20f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-2",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js",
+
+description: "Array.prototype.reduceRight considers new value of elements in array after it is called",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ arr[3] = -2;
+ arr[0] = -1;
+ return prevVal + curVal;
+ }
+
+ var arr = [1,2,3,4,5];
+ if(arr.reduceRight(callbackfn) === 13)
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js
new file mode 100644
index 000000000..e9c5b66b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js",
+
+description: "Array.prototype.reduceRight doesn't consider unvisited deleted elements in array after the call",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ delete arr[1];
+ delete arr[4];
+ return prevVal + curVal;
+ }
+
+ var arr = ['1',2,3,4,5];
+ if(arr.reduceRight(callbackfn) === "121" ) // two elements deleted
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js
new file mode 100644
index 000000000..27f0687e6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-4",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js",
+
+description: "Array.prototype.reduceRight doesn't consider unvisited deleted elements when Array.length is decreased",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ arr.length = 2;
+ return prevVal + curVal;
+ }
+
+ var arr = [1,2,3,4,5];
+ if(arr.reduceRight(callbackfn) === 12 )
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js
new file mode 100644
index 000000000..b3991a7e0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js
@@ -0,0 +1,46 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-5",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js",
+
+description: "Array.prototype.reduceRight - callbackfn not called for array with one element",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ callCnt++;
+ return 2;
+ }
+
+ var arr = [1];
+ if(arr.reduceRight(callbackfn) === 1 && callCnt === 0 )
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js
new file mode 100644
index 000000000..728e1b609
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-6",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js",
+
+description: "Array.prototype.reduceRight visits deleted element in array after the call when same index is also present in prototype",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ delete arr[1];
+ delete arr[2];
+ return prevVal + curVal;
+ }
+ Array.prototype[2] = 6;
+ var arr = ['1',2,3,4,5];
+ var res = arr.reduceRight(callbackfn);
+ delete Array.prototype[2];
+
+ if(res === "151" ) //one element deleted
+ return true;
+
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js
new file mode 100644
index 000000000..e44f41c7f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-b-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js",
+
+description: "Array.prototype.reduceRight returns initialvalue when Array is empty and initialValue is not present",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ }
+
+ var arr = new Array(10);
+
+ if(arr.reduceRight(callbackfn,5) === 5)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js
new file mode 100644
index 000000000..ddafa10b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js
@@ -0,0 +1,59 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-b-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js",
+
+ description: "Array.prototype.reduceRight - added properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 2 && curVal === "2") {
+ testResult = true;
+ }
+ }
+
+ var obj = {};
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ obj[2] = "2";
+ return 3;
+ },
+ configurable: true
+ });
+
+ Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js
new file mode 100644
index 000000000..03fb3af44
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js
@@ -0,0 +1,61 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-b-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js",
+
+ description: "Array.prototype.reduceRight - deleted properties in step 2 are visible here",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var testResult = true;
+
+ function callbackfn(preVal, curVal, idx, obj) {
+ accessed = true;
+ if (idx === 2) {
+ testResult = false;
+ }
+ }
+
+ var obj = { 2: "2", 3: 10 };
+
+ Object.defineProperty(obj, "length", {
+ get: function () {
+ delete obj[2];
+ return 5;
+ },
+ configurable: true
+ });
+
+ Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
+
+ return accessed && testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js
new file mode 100644
index 000000000..578334412
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-c-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js",
+
+description: "Array.prototype.reduceRight - callbackfn not called for indexes never been assigned values",
+
+test: function testcase() {
+
+ var callCnt = 0;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ callCnt++;
+ return curVal;
+ }
+
+ var arr = new Array(10);
+ arr[0] = arr[1] = undefined; //explicitly assigning a value
+ if( arr.reduceRight(callbackfn) === undefined && callCnt === 1)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js
new file mode 100644
index 000000000..cf0e513e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-1",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 0) {
+ testResult = (curVal === 0);
+ }
+ }
+
+ var obj = { 0: 0, 1: 1, 2: 2, length: 2 };
+ Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js
new file mode 100644
index 000000000..87897aef3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var arr = [0, 1, 2];
+ arr.reduceRight(callbackfn, "initialValue");
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js
new file mode 100644
index 000000000..cdaef47bc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js",
+
+ description: "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue");
+ };
+
+ func(0, 1);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js
new file mode 100644
index 000000000..6347a85fe
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js",
+
+ description: "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 2) {
+ testResult = (curVal === 2);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue");
+ };
+
+ func(0, 1, 2);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js
new file mode 100644
index 000000000..df96875ee
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js
@@ -0,0 +1,52 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js",
+
+ description: "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 3) {
+ testResult = (curVal === 3);
+ }
+ }
+
+ var func = function (a, b, c) {
+ Array.prototype.reduceRight.call(arguments, callbackfn, "initialValue");
+ };
+
+ func(0, 1, 2, 3);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js
new file mode 100644
index 000000000..af98e84ca
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js",
+
+ description: "Array.prototype.reduceRight applied to String object, which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === "1");
+ }
+ }
+
+ var str = new String("012");
+ Array.prototype.reduceRight.call(str, callbackfn, "initialValue");
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js
new file mode 100644
index 000000000..ebcda554e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js",
+
+ description: "Array.prototype.reduceRight applied to Function object which implements its own property get method",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var obj = function (a, b, c) {
+ return a + b + c;
+ };
+ obj[0] = 0;
+ obj[1] = 1;
+ obj[2] = 2;
+ obj[3] = 3;
+
+ Array.prototype.reduceRight.call(obj, callbackfn, initialValue);
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+}); \ No newline at end of file
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js
new file mode 100644
index 000000000..97d0849b7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js
@@ -0,0 +1,57 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-3",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === "1");
+ }
+ }
+
+ var proto = { 0: 10, 1: 11, 2: 12, length: 2 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child[1] = "1";
+ child[2] = "2";
+ child.length = 3;
+
+ Array.prototype.reduceRight.call(child, callbackfn, "initialValue");
+ return testResult;
+
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js
new file mode 100644
index 000000000..0cd8b45cf
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ try {
+ Array.prototype[1] = "11";
+ [0, 1, 2].reduceRight(callbackfn, "initialValue");
+ return testResult;
+
+ } finally {
+ delete Array.prototype[1];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js
new file mode 100644
index 000000000..722b6fed6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var proto = { 0: 0, 1: 1, 2: 2 };
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 3;
+
+ Array.prototype.reduceRight.call(child, callbackfn, "initialValue");
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js
new file mode 100644
index 000000000..8456fd55d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-i-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js",
+
+ description: "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array",
+
+ test: function testcase() {
+
+ var testResult = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ try {
+ Array.prototype[0] = 0;
+ Array.prototype[1] = 1;
+ Array.prototype[2] = 2;
+ [, , , ].reduceRight(callbackfn, "initialValue");
+ return testResult;
+
+ } finally {
+ delete Array.prototype[0];
+ delete Array.prototype[1];
+ delete Array.prototype[2];
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight) && ![, 1].hasOwnProperty(0);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js
new file mode 100644
index 000000000..8b7021f9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-c-ii-1",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js",
+
+description: "Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue not passed)",
+
+test: function testcase() {
+
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ if(idx+1 < obj.length && obj[idx] === curVal && obj[idx+1] === prevVal)
+ return curVal;
+ else
+ return false;
+ }
+
+ var arr = [0,1,true,null,new Object(),"five"];
+ if( arr.reduceRight(callbackfn) === 0)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js
new file mode 100644
index 000000000..101fa3b80
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-10",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js",
+
+ description: "Array.prototype.reduceRight - callbackfn is called with 1 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn(prevVal) {
+ called++;
+ return prevVal;
+ }
+
+ return [11, 12].reduceRight(callbackfn, 100) === 100 && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js
new file mode 100644
index 000000000..05ea6ffeb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-11",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js",
+
+ description: "Array.prototype.reduceRight - callbackfn is called with 2 formal parameter",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(prevVal, curVal) {
+ if (prevVal === 100) {
+ testResult = true;
+ }
+ return curVal > 10;
+ }
+
+ return [11].reduceRight(callbackfn, 100) === true && testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js
new file mode 100644
index 000000000..2823ed150
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-12",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js",
+
+ description: "Array.prototype.reduceRight - callbackfn is called with 3 formal parameter",
+
+ test: function testcase() {
+
+ var testResult = false;
+ var arr = [11, 12, 13];
+ var initVal = 6.99;
+
+ function callbackfn(prevVal, curVal, idx) {
+ if (idx === 2) {
+ testResult = (prevVal === initVal);
+ }
+ return curVal > 10 && arguments[3][idx] === curVal;
+ }
+
+ return arr.reduceRight(callbackfn, initVal) === true && testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js
new file mode 100644
index 000000000..64b9ed3f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-13",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js",
+
+ description: "Array.prototype.reduceRight - callbackfn is called with 4 formal parameter",
+
+ test: function testcase() {
+
+ var arr = [11, 12, 13];
+ var initVal = 6.99;
+ var testResult = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 2) {
+ testResult = (prevVal === initVal);
+ }
+ return curVal > 10 && obj[idx] === curVal;
+ }
+
+ return arr.reduceRight(callbackfn, initVal) === true && testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js
new file mode 100644
index 000000000..0a5b23aa3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-14",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js",
+
+ description: "Array.prototype.reduceRight - callbackfn uses arguments",
+
+ test: function testcase() {
+
+ function callbackfn() {
+ return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1];
+ }
+
+ return [11].reduceRight(callbackfn, 100) === true;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-15.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-15.js
new file mode 100644
index 000000000..eb5f788ef
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-15.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-15",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-15.js",
+
+ description: "Array.prototype.reduceRight - undefined is passed as the value of 'this' of 'callbackfn' for each iteration",
+
+ test: function testcase() {
+
+ var testResult = true;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (!('frames' in this && 'document' in this)) {
+ testResult = false;
+ }
+ return true;
+ }
+ [11, 12].reduceRight(callbackfn, 100);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js
new file mode 100644
index 000000000..3ffdfe4a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-16",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js",
+
+ description: "Array.prototype.reduceRight - non-indexed properties are not called on an Array-like object",
+
+ test: function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (prevVal === 8 || curVal === 8) {
+ testResult = true;
+ }
+ }
+
+ var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };
+ Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
+ return !testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js
new file mode 100644
index 000000000..00db7aec3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js
@@ -0,0 +1,55 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-17",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js",
+
+ description: "Array.prototype.reduceRight - 'accumulator' used for current iteration is the result of previous iteration on an Array",
+
+ test: function testcase() {
+
+ var arr = [11, 12, 13];
+ var testResult = true;
+ var initVal = 6.99;
+ var preResult = initVal;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (prevVal !== preResult) {
+ testResult = false;
+ }
+ preResult = curVal;
+ return curVal;
+ }
+
+ arr.reduceRight(callbackfn, initVal);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js
new file mode 100644
index 000000000..1e15c6226
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-18",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js",
+
+ description: "Array.prototype.reduceRight - 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array",
+
+ test: function testcase() {
+
+ var arr = [11, 12];
+ var testResult = false;
+ var initVal = 6.99;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === initVal);
+ }
+ return curVal;
+ }
+
+ arr.reduceRight(callbackfn, initVal);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js
new file mode 100644
index 000000000..4950a0b13
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js
@@ -0,0 +1,51 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-19",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js",
+
+ description: "Array.prototype.reduceRight - value of 'accumulator' used for first iteration is the value of max index property which is not undefined when 'initialValue' is not present on an Array",
+
+ test: function testcase() {
+
+ var arr = [11, 12, 13];
+ var testResult = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (prevVal === 13);
+ }
+ return curVal;
+ }
+ arr.reduceRight(callbackfn);
+
+ return testResult;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js
new file mode 100644
index 000000000..05550e3c7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.4.4.22-9-c-ii-2",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js",
+
+ description: "Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue passed)",
+
+ test: function testcase() {
+ var bParCorrect = false;
+ var arr = [0, 1, true, null, new Object(), "five"];
+ var initialValue = 5.5;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === obj.length - 1 && obj[idx] === curVal && prevVal === initialValue)
+ return curVal;
+ else if (idx + 1 < obj.length && obj[idx] === curVal && obj[idx + 1] === prevVal)
+ return curVal;
+ else
+ return false;
+ }
+ return arr.reduceRight(callbackfn, initialValue) === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js
new file mode 100644
index 000000000..301adf933
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-20",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js",
+
+ description: "Array.prototype.reduceRight - undefined can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return typeof prevVal === "undefined";
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, undefined) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js
new file mode 100644
index 000000000..a664a3f55
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-21",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js",
+
+ description: "Array.prototype.reduceRight - null can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === null;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, null) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js
new file mode 100644
index 000000000..47c29cc90
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-22",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js",
+
+ description: "Array.prototype.reduceRight - boolean primitive can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === false;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, false) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js
new file mode 100644
index 000000000..b2510d024
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-23",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js",
+
+ description: "Array.prototype.reduceRight - number primitive can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === 12;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 12) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js
new file mode 100644
index 000000000..0a2cf036c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-24",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js",
+
+ description: "Array.prototype.reduceRight - string primitive can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === "hello_";
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, "hello_") === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js
new file mode 100644
index 000000000..6f86edc78
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-25",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js",
+
+ description: "Array.prototype.reduceRight - Function Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objFunction = function () { };
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objFunction;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objFunction) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js
new file mode 100644
index 000000000..455865c8b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-26",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js",
+
+ description: "Array.prototype.reduceRight - Array Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objArray = [];
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objArray;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objArray) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js
new file mode 100644
index 000000000..557f0ffce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-27",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js",
+
+ description: "Array.prototype.reduceRight - String Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objString = new String();
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objString;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objString) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js
new file mode 100644
index 000000000..47dbf11da
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-28",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js",
+
+ description: "Array.prototype.reduceRight - Boolean Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objBoolean = new Boolean();
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objBoolean;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objBoolean) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js
new file mode 100644
index 000000000..758e9b492
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-29",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js",
+
+ description: "Array.prototype.reduceRight - Number Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objNumber = new Number();
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objNumber;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objNumber) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js
new file mode 100644
index 000000000..201cfc0b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.4.22-9-c-ii-3",
+
+path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js",
+
+description: "Array.prototype.reduceRight - callbackfn takes 4 arguments",
+
+test: function testcase() {
+
+ var bCalled = false;
+ function callbackfn(prevVal, curVal, idx, obj)
+ {
+ bCalled = true;
+ if(prevVal === true && arguments.length === 4)
+ return true;
+ else
+ return false;
+ }
+ var arr = [0,1,2,3,4,5,6,7,8,9];
+ if(arr.reduceRight(callbackfn,true) === true && bCalled === true)
+ return true;
+ },
+
+precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js
new file mode 100644
index 000000000..da5104f4f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-30",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js",
+
+ description: "Array.prototype.reduceRight - the Math Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === Math;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, Math) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js
new file mode 100644
index 000000000..5608b06f6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-31",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js",
+
+ description: "Array.prototype.reduceRight - Date Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objDate = new Date();
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objDate;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objDate) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js
new file mode 100644
index 000000000..3f9401e18
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js
@@ -0,0 +1,49 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-32",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js",
+
+ description: "Array.prototype.reduceRight - RegExp Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objRegExp = new RegExp();
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objRegExp;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objRegExp) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js
new file mode 100644
index 000000000..b752d7ef7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js
@@ -0,0 +1,48 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-33",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js",
+
+ description: "Array.prototype.reduceRight - the JSON can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === JSON;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, JSON) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js
new file mode 100644
index 000000000..33c48f78b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-34",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js",
+
+ description: "Array.prototype.reduceRight - Error Object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var objError = new RangeError();
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === objError;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, objError) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js
new file mode 100644
index 000000000..1b699886d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-35",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js",
+
+ description: "Array.prototype.reduceRight - the Arguments object can be used as accumulator",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var arg;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ return prevVal === arg;
+ }
+
+ var obj = { 0: 11, length: 1 };
+
+ (function fun() {
+ arg = arguments;
+ }(10, 11, 12, 13));
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, arg) === true && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js
new file mode 100644
index 000000000..9bf304121
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js
@@ -0,0 +1,54 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-4",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js",
+
+ description: "Array.prototype.reduceRight - k values are passed in acending numeric order",
+
+ test: function testcase() {
+
+ var arr = [0, 1, 2, 3, 4, 5];
+ var lastIdx = arr.length - 1;
+ var accessed = false;
+ var result = true;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ if (lastIdx !== idx) {
+ result = false;
+ } else {
+ lastIdx--;
+ }
+ }
+ arr.reduceRight(callbackfn, 1);
+ return result && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js
new file mode 100644
index 000000000..f2969363b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js
@@ -0,0 +1,60 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-5",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js",
+
+ description: "Array.prototype.reduceRight - k values are accessed during each iteration and not prior to starting the loop on an Array",
+
+ test: function testcase() {
+ var arr = [11, 12, 13, 14];
+ var kIndex = [];
+ var result = true;
+ var called = 0;
+
+ //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.
+ function callbackfn(preVal, curVal, idx, o) {
+ //Each position should be visited one time, which means k is accessed one time during iterations.
+ called++;
+ if (typeof kIndex[idx] === "undefined") {
+ //when current position is visited, its next index should has been visited.
+ if (idx !== arr.length - 1 && typeof kIndex[idx + 1] === "undefined") {
+ result = false;
+ }
+ kIndex[idx] = 1;
+ } else {
+ result = false;
+ }
+ }
+
+ arr.reduceRight(callbackfn, 1);
+ return result && called === 4;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-6.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-6.js
new file mode 100644
index 000000000..5fdc7dce4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-6.js
@@ -0,0 +1,53 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-6",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-6.js",
+
+ description: "Array.prototype.reduceRight - arguments to callbackfn are self consistent",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var obj = { 0: 11, length: 1 };
+ function callbackfn() {
+ accessed = true;
+ return 'frames' in this &&
+ 'document' in this &&
+ arguments[0] === 100 &&
+ arguments[1] === 11 &&
+ arguments[2] === 0 &&
+ arguments[3] === obj;
+ }
+
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 100) && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js
new file mode 100644
index 000000000..26055d322
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js
@@ -0,0 +1,58 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-7",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js",
+
+ description: "Array.prototype.reduceRight - unhandled exceptions happened in callbackfn terminate iteration",
+
+ test: function testcase() {
+
+ var accessed = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx < 10) {
+ accessed = true;
+ }
+ if (idx === 10) {
+ throw new Error("Exception occurred in callbackfn");
+ }
+ }
+
+ var obj = { 0: 11, 4: 10, 10: 8, length: 20 };
+
+ try {
+ Array.prototype.reduceRight.call(obj, callbackfn, 1);
+ return false;
+ } catch (ex) {
+ return !accessed;
+ }
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js
new file mode 100644
index 000000000..6310e612a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js
@@ -0,0 +1,50 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-8",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js",
+
+ description: "Array.prototype.reduceRight - element changed by callbackfn on previous iterations is observed",
+
+ test: function testcase() {
+
+ var accessed = false;
+ var obj = { 0: 11, 1: 12, length: 2 };
+ function callbackfn(prevVal, curVal, idx, obj) {
+ accessed = true;
+ if (idx === 1) {
+ obj[idx - 1] = 8;
+ }
+ return curVal > 10;
+ }
+
+ return Array.prototype.reduceRight.call(obj, callbackfn, 1) === false && accessed;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js
new file mode 100644
index 000000000..581d7722a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js
@@ -0,0 +1,47 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+ES5Harness.registerTest({
+
+ id: "15.4.4.22-9-c-ii-9",
+
+ path: "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js",
+
+ description: "Array.prototype.reduceRight - callbackfn is called with 0 formal parameter",
+
+ test: function testcase() {
+
+ var called = 0;
+
+ function callbackfn() {
+ called++;
+ return true;
+ }
+
+ return [11, 12].reduceRight(callbackfn, 11) === true && 2 === called;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Array.prototype.reduceRight);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5-1.js
new file mode 100644
index 000000000..58aa5b693
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.5-1",
+
+path: "TestCases/chapter15/15.4/15.4.5/15.4.5-1.js",
+
+description: "Array instances have [[Class]] set to 'Array'",
+
+test: function testcase() {
+ var a = [];
+ var s = Object.prototype.toString.call(a);
+ if (s === '[object Array]') {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js
new file mode 100644
index 000000000..81104c72c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.5.1-3.d-1",
+
+path: "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js",
+
+description: "Throw RangeError if attempt to set array length property to 4294967296 (2**32)",
+
+test: function testcase() {
+ try {
+ [].length = 4294967296 ;
+ } catch (e) {
+ if (e instanceof RangeError) return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js
new file mode 100644
index 000000000..c1f1395a0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.5.1-3.d-2",
+
+path: "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js",
+
+description: "Throw RangeError if attempt to set array length property to 4294967297 (1+2**32)",
+
+test: function testcase() {
+ try {
+ [].length = 4294967297 ;
+ } catch (e) {
+ if (e instanceof RangeError) return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js
new file mode 100644
index 000000000..165826ba1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.5.1-3.d-3",
+
+path: "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js",
+
+description: "Set array length property to max value 4294967295 (2**32-1,)",
+
+test: function testcase() {
+ var a =[];
+ a.length = 4294967295 ;
+ return a.length===4294967295 ;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js
new file mode 100644
index 000000000..2a3f5eb3c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.5.1-5-1",
+
+path: "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js",
+
+description: "Defining a property named 4294967295 (2**32-1)(not an array element)",
+
+test: function testcase() {
+ var a =[];
+ a[4294967295] = "not an array element" ;
+ return a[4294967295] === "not an array element";
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js
new file mode 100644
index 000000000..fc84115ce
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.4.5.1-5-2",
+
+path: "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js",
+
+description: "Defining a property named 4294967295 (2**32-1) doesn't change length of the array",
+
+test: function testcase() {
+ var a =[0,1,2];
+ a[4294967295] = "not an array element" ;
+ return a.length===3;
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js
new file mode 100644
index 000000000..5a0fc3c2c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-0-1",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js",
+
+description: "String.prototype.trim must exist as a function",
+
+test: function testcase() {
+ var f = String.prototype.trim;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js
new file mode 100644
index 000000000..9ce4c6a1a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-0-2",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js",
+
+description: "String.prototype.trim must exist as a function taking 0 parameters",
+
+test: function testcase() {
+ if (String.prototype.trim.length === 0) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js
new file mode 100644
index 000000000..bbbdaa8a5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-1-1",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js",
+
+description: "String.prototype.trim throws TypeError when string is undefined",
+
+test: function testcase() {
+ try
+ {
+ String.prototype.trim.call(undefined);
+ }
+ catch(e)
+ {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js
new file mode 100644
index 000000000..0ba5b1165
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js
@@ -0,0 +1,44 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-1-2",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js",
+
+description: "String.prototype.trim throws TypeError when string is null",
+
+test: function testcase() {
+ try
+ {
+ String.prototype.trim.call(null);
+ }
+ catch(e)
+ {
+ if(e instanceof TypeError)
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js
new file mode 100644
index 000000000..06b09be6f
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-1-3",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js",
+
+description: "String.prototype.trim works for primitive type boolean",
+
+test: function testcase() {
+ try
+ {
+ if(String.prototype.trim.call(true) == "true")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js
new file mode 100644
index 000000000..28b2259bb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-1-4",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js",
+
+description: "String.prototype.trim works for primitive type number",
+
+test: function testcase() {
+ try
+ {
+ if(String.prototype.trim.call(0) == "0")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js
new file mode 100644
index 000000000..052a0106c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-1-5",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js",
+
+description: "String.prototype.trim works for an Object",
+
+test: function testcase() {
+ try
+ {
+ if(String.prototype.trim.call({})=="[object Object]")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js
new file mode 100644
index 000000000..3155836c6
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-1-6",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js",
+
+description: "String.prototype.trim works for an String",
+
+test: function testcase() {
+ try
+ {
+ if(String.prototype.trim.call(new String()) == "")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js
new file mode 100644
index 000000000..ddb35c75b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js
@@ -0,0 +1,43 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-1-7",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js",
+
+description: "String.prototype.trim works for a primitive string",
+
+test: function testcase() {
+ try
+ {
+ if(String.prototype.trim.call("abc") === "abc")
+ return true;
+ }
+ catch(e)
+ {
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js
new file mode 100644
index 000000000..62dc28ceb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-1",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js",
+
+description: "String.prototype.trim handles multiline string with whitepace and lineterminators",
+
+test: function testcase() {
+var s = "\u0009a b\
+c \u0009"
+
+
+ if (s.trim() === "a bc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js
new file mode 100644
index 000000000..46bf801ae
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-10",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\uFEFFabc)",
+
+test: function testcase() {
+ if ("\uFEFFabc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js
new file mode 100644
index 000000000..63f89310b
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-11",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u0009)",
+
+test: function testcase() {
+ if ("abc\u0009".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js
new file mode 100644
index 000000000..7871a279d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-12",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u000B)",
+
+test: function testcase() {
+ if ("abc\u000B".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js
new file mode 100644
index 000000000..dfbc281b1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-13",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u000C)",
+
+test: function testcase() {
+ if ("abc\u000C".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js
new file mode 100644
index 000000000..4e7239620
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-14",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u0020)",
+
+test: function testcase() {
+ if ("abc\u0020".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js
new file mode 100644
index 000000000..55c157b11
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-16",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u00A0)",
+
+test: function testcase() {
+ if ("abc\u00A0".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js
new file mode 100644
index 000000000..f530c2a40
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-18",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\uFEFF)",
+
+test: function testcase() {
+ if ("abc\uFEFF".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js
new file mode 100644
index 000000000..935f61d5c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-19",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u0009abc\\u0009)",
+
+test: function testcase() {
+ if ("\u0009abc\u0009".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js
new file mode 100644
index 000000000..dd3c73c59
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-2",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators ( \\u0009abc \\u0009)",
+
+test: function testcase() {
+ if (" \u0009abc \u0009".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js
new file mode 100644
index 000000000..c93fceb45
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-20",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Babc\\u000B)",
+
+test: function testcase() {
+ if ("\u000Babc\u000B".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js
new file mode 100644
index 000000000..8d983342d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-21",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Cabc\\u000C)",
+
+test: function testcase() {
+ if ("\u000Cabc\u000C".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js
new file mode 100644
index 000000000..6ae408208
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-22",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u0020abc\\u0020)",
+
+test: function testcase() {
+ if ("\u0020abc\u0020".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js
new file mode 100644
index 000000000..e5cdd16d1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-24",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u00A0abc\\u00A0)",
+
+test: function testcase() {
+ if ("\u00A0abc\u00A0".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js
new file mode 100644
index 000000000..131e96a17
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-27",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u0009\\u0009)",
+
+test: function testcase() {
+ if ("\u0009\u0009".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js
new file mode 100644
index 000000000..aa1151cc4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-28",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000B\\u000B)",
+
+test: function testcase() {
+ if ("\u000B\u000B".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js
new file mode 100644
index 000000000..b416f8569
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-29",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000C\\u000C)",
+
+test: function testcase() {
+ if ("\u000C\u000C".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js
new file mode 100644
index 000000000..552c13058
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-3",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u0009abc)",
+
+test: function testcase() {
+ if ("\u0009abc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js
new file mode 100644
index 000000000..0a290bde0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-30",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u0020\\u0020)",
+
+test: function testcase() {
+ if ("\u0020\u0020".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js
new file mode 100644
index 000000000..d875c76d4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-32",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u00A0\\u00A0)",
+
+test: function testcase() {
+ if ("\u00A0\u00A0".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js
new file mode 100644
index 000000000..b24e4b21e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-34",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\uFEFF\\uFEFF)",
+
+test: function testcase() {
+ if ("\uFEFF\uFEFF".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js
new file mode 100644
index 000000000..b1f1d4bc9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-35",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\u0009c)",
+
+test: function testcase() {
+ if ("ab\u0009c".trim() === "ab\u0009c") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js
new file mode 100644
index 000000000..df5f6c249
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-36",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\u000Bc)",
+
+test: function testcase() {
+ if ("ab\u000Bc".trim() === "ab\u000Bc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js
new file mode 100644
index 000000000..3fa478e10
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-37",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\u000Cc)",
+
+test: function testcase() {
+ if ("ab\u000Cc".trim() === "ab\u000Cc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js
new file mode 100644
index 000000000..c427ba1aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-38",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\u0020c)",
+
+test: function testcase() {
+ if ("ab\u0020c".trim() === "ab\u0020c") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js
new file mode 100644
index 000000000..8c8cbd86a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-39",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\u0085c)",
+
+test: function testcase() {
+ if ("ab\u0085c".trim() === "ab\u0085c") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js
new file mode 100644
index 000000000..dadc2e8eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-4",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Babc)",
+
+test: function testcase() {
+ if ("\u000Babc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js
new file mode 100644
index 000000000..10b448775
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-40",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\u00A0c)",
+
+test: function testcase() {
+ if ("ab\u00A0c".trim() === "ab\u00A0c") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js
new file mode 100644
index 000000000..be1a183c9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-41",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\u200Bc)",
+
+test: function testcase() {
+ if ("ab\u200Bc".trim() === "ab\u200Bc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js
new file mode 100644
index 000000000..8d011f1af
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-42",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (ab\\uFEFFc)",
+
+test: function testcase() {
+ if ("ab\uFEFFc".trim() === "ab\uFEFFc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js
new file mode 100644
index 000000000..9b4fa63c1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-43",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Aabc)",
+
+test: function testcase() {
+ if ("\u000Aabc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js
new file mode 100644
index 000000000..da525b956
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-44",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Dabc)",
+
+test: function testcase() {
+ if ("\u000Dabc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js
new file mode 100644
index 000000000..464688abc
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-45",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u2028abc)",
+
+test: function testcase() {
+ if ("\u2028abc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js
new file mode 100644
index 000000000..1f5467b9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-46",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u2029abc)",
+
+test: function testcase() {
+ if ("\u2029abc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js
new file mode 100644
index 000000000..71a64f849
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-47",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u000A)",
+
+test: function testcase() {
+ if ("abc\u000A".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js
new file mode 100644
index 000000000..56d554727
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-48",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u000D)",
+
+test: function testcase() {
+ if ("abc\u000D".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js
new file mode 100644
index 000000000..00ac35c95
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-49",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u2028)",
+
+test: function testcase() {
+ if ("abc\u2028".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js
new file mode 100644
index 000000000..fb23ee656
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-5",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Cabc)",
+
+test: function testcase() {
+ if ("\u000Cabc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js
new file mode 100644
index 000000000..0191d4d9c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-50",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (abc\\u2029)",
+
+test: function testcase() {
+ if ("abc\u2029".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js
new file mode 100644
index 000000000..604dce2b5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-51",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Aabc\\u000A)",
+
+test: function testcase() {
+ if ("\u000Aabc\u000A".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js
new file mode 100644
index 000000000..d83350371
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-52",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000Dabc\\u000D)",
+
+test: function testcase() {
+ if ("\u000Dabc\u000D".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js
new file mode 100644
index 000000000..18d956b94
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-53",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u2028abc\\u2028)",
+
+test: function testcase() {
+ if ("\u2028abc\u2028".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js
new file mode 100644
index 000000000..000906c43
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-54",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u2029abc\\u2029)",
+
+test: function testcase() {
+ if ("\u2029abc\u2029".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js
new file mode 100644
index 000000000..9a4220c0a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-55",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000A\\u000A)",
+
+test: function testcase() {
+ if ("\u000A\u000A".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js
new file mode 100644
index 000000000..f672ec572
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-56",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u000D\\u000D)",
+
+test: function testcase() {
+ if ("\u000D\u000D".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js
new file mode 100644
index 000000000..2b64bd554
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-57",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u2028\\u2028)",
+
+test: function testcase() {
+ if ("\u2028\u2028".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js
new file mode 100644
index 000000000..d89ac3e9e
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-58",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u2029\\u2029)",
+
+test: function testcase() {
+ if ("\u2029\u2029".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js
new file mode 100644
index 000000000..73203dae1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js
@@ -0,0 +1,40 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-59",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u2029abc as a multiline string)",
+
+test: function testcase() {
+ var s = "\u2029\
+ abc";
+ if (s.trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js
new file mode 100644
index 000000000..b2a8b30ed
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-6",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u0020abc)",
+
+test: function testcase() {
+ if ("\u0020abc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js
new file mode 100644
index 000000000..d31f7505c
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-60",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (string with just blanks)",
+
+test: function testcase() {
+ if (" ".trim() === "") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js
new file mode 100644
index 000000000..b918d8faa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.5.4.20-4-8",
+
+path: "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js",
+
+description: "String.prototype.trim handles whitepace and lineterminators (\\u00A0abc)",
+
+test: function testcase() {
+ if ("\u00A0abc".trim() === "abc") {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(String.prototype.trim);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js
new file mode 100644
index 000000000..08fd0f2df
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-1-1",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js",
+
+description: "String object supports bracket notation to lookup of data properties",
+
+test: function testcase() {
+ var s = new String("hello world");
+ s.foo = 1;
+
+ if (s["foo"] === 1) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js
new file mode 100644
index 000000000..5acbdd9b3
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-1-2",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js",
+
+description: "String value supports bracket notation to lookup data properties",
+
+test: function testcase() {
+ var s = String("hello world");
+
+ if (s["foo"] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js
new file mode 100644
index 000000000..024fbe5aa
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-1",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js",
+
+description: "String object indexing returns undefined for missing data properties",
+
+test: function testcase() {
+ var s = new String("hello world");
+
+ if (s["foo"] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js
new file mode 100644
index 000000000..e522fb460
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-2",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js",
+
+description: "String value indexing returns undefined for missing data properties",
+
+test: function testcase() {
+ var s = String("hello world");
+
+ if (s["foo"] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js
new file mode 100644
index 000000000..49226ade9
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-3",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js",
+
+description: "String object indexing returns undefined if the numeric index (NaN) is not an array index",
+
+test: function testcase() {
+ var s = new String("hello world");
+
+ if (s[NaN] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js
new file mode 100644
index 000000000..914dfedd7
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-4",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js",
+
+description: "String object indexing returns undefined if the numeric index (Infinity) is not an array index",
+
+test: function testcase() {
+ var s = new String("hello world");
+
+ if (s[Infinity] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js
new file mode 100644
index 000000000..b163393e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-5",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js",
+
+description: "String object indexing returns undefined if the numeric index ( 2^32-1) is not an array index",
+
+test: function testcase() {
+ var s = new String("hello world");
+
+ if (s[Math.pow(2, 32)-1]===undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js
new file mode 100644
index 000000000..2f689e73a
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-6",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js",
+
+description: "String value indexing returns undefined if the numeric index (NaN) is not an array index",
+
+test: function testcase() {
+ var s = String("hello world");
+
+ if (s[NaN] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js
new file mode 100644
index 000000000..840878f78
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-7",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js",
+
+description: "String value indexing returns undefined if the numeric index (Infinity) is not an array index",
+
+test: function testcase() {
+ var s = String("hello world");
+
+ if (s[Infinity] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js
new file mode 100644
index 000000000..877c20be2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-3-8",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js",
+
+description: "String value indexing returns undefined if the numeric index ( >= 2^32-1) is not an array index",
+
+test: function testcase() {
+ var s = String("hello world");
+
+ if (s[Math.pow(2, 32)-1]===undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js
new file mode 100644
index 000000000..fb74434b4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-7-1",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js",
+
+description: "String object indexing returns undefined if the numeric index is less than 0",
+
+test: function testcase() {
+ var s = new String("hello world");
+
+ if (s[-1] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js
new file mode 100644
index 000000000..f5be90e18
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-7-2",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js",
+
+description: "String value indexing returns undefined if the numeric index is less than 0",
+
+test: function testcase() {
+ var s = String("hello world");
+
+ if (s[-1] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js
new file mode 100644
index 000000000..70459add4
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-7-3",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js",
+
+description: "String object indexing returns undefined if the numeric index is greater than the string length",
+
+test: function testcase() {
+ var s = new String("hello world");
+
+ if (s[11] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js
new file mode 100644
index 000000000..fe76f25e5
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js
@@ -0,0 +1,41 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
+notation to look up non numeric property names.
+*/
+
+
+ES5Harness.registerTest( {
+id: "15.5.5.5.2-7-4",
+
+path: "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js",
+
+description: "String value indexing returns undefined if the numeric index is greater than the string length",
+
+test: function testcase() {
+ var s = String("hello world");
+
+ if (s[11] === undefined) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-1.js b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-1.js
new file mode 100644
index 000000000..3153f15eb
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-1.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.7.3-1",
+
+path: "TestCases/chapter15/15.7/15.7.3/15.7.3-1.js",
+
+description: "Number constructor - [[Prototype]] is the Function prototype object",
+
+test: function testcase() {
+ if (Function.prototype.isPrototypeOf(Number) === true) {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-2.js b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-2.js
new file mode 100644
index 000000000..5685dbe75
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3-2.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.7.3-2",
+
+path: "TestCases/chapter15/15.7/15.7.3/15.7.3-2.js",
+
+description: "Number constructor - [[Prototype]] is the Function prototype object (using getPrototypeOf)",
+
+test: function testcase() {
+ var p = Object.getPrototypeOf(Number);
+ if (p === Function.prototype) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js
new file mode 100644
index 000000000..b158d9ed1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js
@@ -0,0 +1,42 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.7.3.1-1",
+
+path: "TestCases/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js",
+
+description: "Number.prototype is a data property with default attribute values (false)",
+
+test: function testcase() {
+ var d = Object.getOwnPropertyDescriptor(Number, 'prototype');
+
+ if (d.writable === false &&
+ d.enumerable === false &&
+ d.configurable === false) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getOwnPropertyDescriptor);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js
new file mode 100644
index 000000000..957ac57b0
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.7.3.1-2",
+
+path: "TestCases/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js",
+
+description: "Number.prototype, initial value is the Number prototype object",
+
+test: function testcase() {
+ // assume that Number.prototype has not been modified.
+ return Object.getPrototypeOf(new Number(42))===Number.prototype;
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.7/15.7.4/15.7.4-1.js b/test/suite/ietestcenter/chapter15/15.7/15.7.4/15.7.4-1.js
new file mode 100644
index 000000000..1ec277593
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.7/15.7.4/15.7.4-1.js
@@ -0,0 +1,39 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.7.4-1",
+
+path: "TestCases/chapter15/15.7/15.7.3/15.7.4/15.7.4-1.js",
+
+description: "Number prototype object: its [[Class]] must be 'Number'",
+
+test: function testcase() {
+ var numProto = Object.getPrototypeOf(new Number(42));
+ var s = Object.prototype.toString.call(numProto );
+ return (s === '[object Number]') ;
+ },
+
+precondition: function prereq() {
+ return fnExists(Object.getPrototypeOf);
+ }
+
+});
diff --git a/test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js b/test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js
new file mode 100644
index 000000000..d4c962e56
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.9.4.4-0-1",
+
+ path: "TestCases/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js",
+
+ description: "Date.now must exist as a function",
+
+ test: function testcase() {
+ return typeof Date.now === "function";
+ },
+
+ precondition: function prereq() {
+ return fnExists(Date.now);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js b/test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js
new file mode 100644
index 000000000..9654e8222
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.9.4.4-0-2",
+
+ path: "TestCases/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js",
+
+ description: "Date.now must exist as a function taking 0 parameters",
+
+ test: function testcase() {
+ return Date.now.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Date.now);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-1.js b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-1.js
new file mode 100644
index 000000000..030ec7df1
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.9.5.43-0-1",
+
+path: "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-1.js",
+
+description: "Date.prototype.toISOString must exist as a function",
+
+test: function testcase() {
+ var f = Date.prototype.toISOString;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js
new file mode 100644
index 000000000..e377d98e2
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js
@@ -0,0 +1,36 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest({
+ id: "15.9.5.43-0-2",
+
+ path: "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js",
+
+ description: "Date.prototype.toISOString must exist as a function taking 0 parameters",
+
+ test: function testcase() {
+ return Date.prototype.toISOString.length === 0;
+ },
+
+ precondition: function prereq() {
+ return fnExists(Date.prototype.toISOString);
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js
new file mode 100644
index 000000000..f5c75fa7d
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js
@@ -0,0 +1,35 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.9.5.44-0-1",
+
+path: "TestCases/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js",
+
+description: "Date.prototype.toJSON must exist as a function",
+
+test: function testcase() {
+ var f = Date.prototype.toJSON;
+ if (typeof(f) === "function") {
+ return true;
+ }
+ }
+});
diff --git a/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js
new file mode 100644
index 000000000..eebb1a483
--- /dev/null
+++ b/test/suite/ietestcenter/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js
@@ -0,0 +1,38 @@
+/// Copyright (c) 2009 Microsoft Corporation
+///
+/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
+/// that the following conditions are met:
+/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
+/// the following disclaimer.
+/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+/// the following disclaimer in the documentation and/or other materials provided with the distribution.
+/// * Neither the name of Microsoft nor the names of its contributors may be used to
+/// endorse or promote products derived from this software without specific prior written permission.
+///
+/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ES5Harness.registerTest( {
+id: "15.9.5.44-0-2",
+
+path: "TestCases/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js",
+
+description: "Date.prototype.toJSON must exist as a function taking 1 parameter",
+
+test: function testcase() {
+ if (Date.prototype.toJSON.length === 1) {
+ return true;
+ }
+ },
+
+precondition: function prereq() {
+ return fnExists(Date.prototype.toJSON);
+ }
+});